python/tag.cc: Ignore missing 'encoding' attribute in file objects

In case the encoding attribute does not exist, Python sets an
exception. We must thus clear the exception, otherwise it might
be raised at some later point in the code.