-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when copying newly imported files #2537
Comments
That's certainly strange! It looks like this is coming from the |
I'll try tomorrow. I suspect it's related to the last track being a continuous mix of the whole album (i.e. very long) and in FLAC format. |
Curiously this only happened during import, disabling the automatic keyfinder scan on import and running the plugin on the problematic file manually worked perfectly fine. |
Strange! I'm pretty stumped about how this particular operation could fail during import… do you know whether this happens every time if you try importing the problematic file again? |
Yup, happened everytime I tried. No idea if related, but this particular file is not shown in the MusicBrainz entry (most likely that one does not refer to the bandcamp release). |
OK; thanks! So I can try to reproduce the problem, do you know where I can get a copy of this file (or another offending track)? |
There's a bandcamp link in the OP. Or you can poke me on IRC. |
OK, cool—I might try to find you on IRC for a copy of the file. In the mean time, though, I should have asked: is there anything useful in the verbose log leading up to the crash? |
No, up to the backtrace everything is going peachy. (just retried with an empty db) Full log:
|
Hmm… I'm suddenly suspicious that this might have to do with interference with another plugin. Is there any chance you can try temporarily disabling all your plugins except for |
Same result with only keyfinder enabled: (log lines omitted as they are the same as before)
|
Very troubling! It does seem like this must be coming from |
See earlier in the discussion - everything is fine if keyfinder is disabled on import. (even when running it manually afterwards) |
I discovered this issue through Google by looking for "beets Item has no database". I'm still assuming that this is relevant, because I am having the same issue. However, it is with a different album, different plugin, different operating system, different beets version and even different Python architecture. I have a plugin that adds albums imported into beets to the bottom of my MPD queue, so I can then listen to them later: beets-mpdqueue. It's fairly simple and I've written it myself. Used it with hundreds of imports, has worked well for >99% of the time. Sometimes it failed to connect to the MPD server, logging warning messages. Nothing too serious, nothing crashy. However, when I tried importing Solanin by Mere (no minimum payment on Bandcamp), beets crashed and my plugin is actually part of the traceback.
It calls a different part of the API, but it goes through the same I'm on macOS 10.13.2. It's not a Mac though, just some PC hardware with macOS on it. Shouldn't be relevant here. I'm running beets version 1.4.6 on Python version 3.6.5. Now, onto the interesting bits. This is from the original reporter:
And this is from mine:
Hopefully you can spot the similarity. Again, from the original report:
And now from mine:
Now, I don't know if this is shoddy coding on my part or not, but it seems that whenever these plugins attempt something with these phantom tracks, everything goes horribly wrong and beets goes belly-up. No issue importing when I disable my own plugin. Tracks 01~08 get copied to the media directory and no crashing. |
Wow, thank you! This really helps shed some light on the problem. It looks like we need to remove unmatched tracks from the set before we send albums to plugins. I’ll investigate further. |
Alright! I did some more digging and found the root cause: I'm pushing a fix for |
Seems to work fine with |
Good point. If you ever have a moment, we could use a hand explaining this in the plugin authoring docs. |
Problem
Downloaded https://ultimae.bandcamp.com/album/hanging-masses and tried to import it, causing beets to crash between updating the db and copying the files to the media dir.
Running this command in verbose (
-vv
) mode:Led to this problem:
Setup
My configuration (output of
beet config
) is:The text was updated successfully, but these errors were encountered: