Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
extraction failed: local variable 'archive' referenced before assignment #3041
When trying to import a mp3-file as a singleton, I get the following error:
The file is is a mp3-version of this song (
After digging in the code, I found this line: importer.py
By the way, why does beets try to extract a mp3-file?
Here's a link to the music files that trigger the bug (if relevant):
Actually, now that I think of it:
for path_test, handler_class in self.handlers(): if path_test(util.py3_path(self.toppath)): break
This stanza doesn't seem to bail out if there are no matching handlers. It seems to just continue on with the last handler, even if it didn't claim to be able to extract the file. I think we need to add:
to abort when there is no match. Would that make sense?
Getting this result now:
Weird! For what it's wort, I'm able to reproduce this if I use the
I'm not exactly sure what to suggest. We could whitelist filename extensions, for example, or fall back to an ordinary import procedure if extraction fails?