diff --git a/picard/formats/__init__.py b/picard/formats/__init__.py index d36ade58c..e8e410cff 100644 --- a/picard/formats/__init__.py +++ b/picard/formats/__init__.py @@ -82,7 +82,7 @@ def open_(filename): # None is returned if both the methods fail return None except Exception as error: - log.error("Error occured:\n{}".format(error.message)) + log.error("Error occured:\n{}".format(error)) return None diff --git a/picard/formats/mutagenext/tak.py b/picard/formats/mutagenext/tak.py index 7b4fd1426..e320a5658 100644 --- a/picard/formats/mutagenext/tak.py +++ b/picard/formats/mutagenext/tak.py @@ -47,7 +47,7 @@ class TAK(APEv2File): _mimes = ["audio/x-tak"] def score(filename, fileobj, header): - return header.startswith("tBaK") + filename.lower().endswith(".tak") + return header.startswith(b"tBaK") + filename.lower().endswith(".tak") score = staticmethod(score) Open = TAK