Skip to content
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

EasyID3 RegisterTXXXKey() exception : ValueError: max() arg is an empty sequence #135

Closed
lazka opened this issue Jul 4, 2014 · 3 comments
Closed
Labels
bug

Comments

@lazka
Copy link
Member

@lazka lazka commented Jul 4, 2014

Originally reported by: Christoph Reiter (Bitbucket: lazka, GitHub: lazka)


From lmonin....@gmail.com on January 29, 2013 13:44:51

Trying to set easyid3 tag to an empty string may result in such exception:
ValueError: max() arg is an empty sequence

To reproduce, just add following test to tests/test_easyid3.py:

    def test_txxx_set_get_empty(self):
        self.failIf("asin" in self.id3.keys())
        self.id3["asin"] = ""
        self.failUnless("asin" in self.id3.keys())
        self.failUnlessEqual(self.id3["asin"], [""])
        self.failUnless("TXXX:ASIN" in self.id3._EasyID3__id3)


This test should fail in "mutagen/easyid3.py", line 149, in setter
    if max(v) > u'\x7f':
which is trying to detect encoding.

When v is an empty string, max(v) will raise an exception.
Test should prolly be modified to:
    if v and max(v) > u'\x7f':

Original issue: http://code.google.com/p/mutagen/issues/detail?id=135


@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From reiter.christoph@gmail.com on February 18, 2013 03:24:21

Status: Accepted
Labels: -Type-Enhancement Type-Defect

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From reiter.christoph@gmail.com on February 18, 2013 03:36:42

This issue was closed by revision 61f91e4fa34a .

Status: Fixed

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From reiter.christoph@gmail.com on February 18, 2013 03:38:11

Thanks for the detailed report
@lazka lazka added trivial bug labels Apr 7, 2016
@lazka lazka closed this Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.