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
AttributeError when changing date tag #1404
Comments
Confirmed to be a problem on HEAD too. The date parsing isn't attempted anywhere, but I'm not sure at which level/step it should happen ideally. |
Beets doesn't use a field called Can you try modifying |
(That said, this definitely should not crash. 😃 I'll look into it.) |
Thanks for your reply! I'm sorry, I read over what I originally wrote and realized it wasn't clear. When I said I tried to change the date separately I meant that I tried to change the year/month/day fields separately. Bottom line, I get the same output when I try to modify the year or month separately too :-( beet -v modify The Autumn Effect day="16" yields this output: https://gist.github.com/dirtdigger/d1845971ce229d03ddff For what it's worth, I was able to find a temporary workaround for my use case. The issue was that the Italian iTunes reports this as being released on January 1, whereas the album really wasn't actually released until August 16. This makes MusicBrainz (incorrectly) report 2005-01-01 as the original release date, so I just disabled original_date temporarily and re-imported :-) |
@sampsyo: "date" is not an item field, and therefore absent of Moreover I built the following test in
It fails that way when run with the
Running it with python gives OP's error without any non-ascii character, so this might be a side effect of another test but running nosetests with that test only still shows the problem: |
@dirtdigger Oh dear—now it looks like we've gotten your database into a bad state where every modify you do will re-try setting the underlying metadata field and get this error. That's no good at all. Fortunately, the fix will still be the same. @brunal Thanks for digging into this. This matches my intuition. One easy but unsatifying solution would be to make those date field names not propagate to MediaFile. That is, they would look like any other flexible attribute. (We could even remove them from MediaFile; they're not all that useful). I suppose it would be nice to just make them do the expected thing, however: to implicitly set the component fields in the database. But then we'd need to build the opposite direction as well: updating the component So I think I lean tentatively toward just removing That logging capture error is somewhat disturbing. I agree that it might be an artifact of something else. I wish those errors would blame the specific logging statement that caused them. |
How will this affect being able to set an album's release date? I'm not sure what ID3 field it uses, but in all taggers and other players there is a field for date (what is being discussed in this issue, I assume). I will still be able to set "year" using beets, have it saved to the file, and view it in another player, right? |
If I'm right:
Is that right? if so what type should those receive? a DateType-like instance with its |
@flight16 It won't; no worries—modifying the components will continue to work. @brunal Hmm; good point. I temporarily forgot that the aggregate So we have two options:
If we do the latter, I think this will actually have less to do with DateType and more to do with the way computed fields work. Currently, they're plumbed with a simple "getter" function that the Model class can register. We'd now need to make this a getter/setter pair, akin to a Python descriptor. Then, the parsing can be decoupled from the logic here that aggregates and disaggregates the parts of the date. |
Fixed the "easy" way. Thanks for your patience. |
Hello! New beets user, and I am working on slowly importing my music into beets.
I can't actually change the date on any of the files that I've already imported. I started by trying to change the date on an album whose original release date was wrong on MusicBrainz. Here's the command I used:
beet -v modify The Autumn Effect date="2005-08-16"
and the output: https://gist.github.com/dirtdigger/aea6c0c97d5bfbae37ac
I tried rolling back to 1.3.10 in case it was something new, but the same thing happened there too. It doesn't just happen with that album, it's happened to any album that I try to change the date on, and it happens on both flac and mp3 albums. This also happens when I just try to change the date separately.
System information: beets 1.3.11, Arch Linux
Any help would be appreciated. Thanks :-)
The text was updated successfully, but these errors were encountered: