leosongwei / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
0 stars 0 forks source link

TMid3Iconv and TMid3v2 tests fail in 1.22, worked in 1.21 #161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm building mutagen for use on OS X 10.7 with (Fink's) python2.7.

When running "python2.7 setup.py test", tests TMid3Iconv and TMid3v2 fail:

*******
TMid3Iconv (7):          EEE....                                             4
======================================================================
ERROR: test_comm (tests.test_tools_mid3iconv.TMid3Iconv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3iconv.py", line 74, in test_comm
    res, out = self.call("-d", "-e", codec, self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3iconv", line 142, in main
    update(options, args)
  File "tools/mid3iconv", line 92, in update
    print id3.pprint().encode(enc, "replace")
LookupError: unknown encoding: 

======================================================================
ERROR: test_conv_basic (tests.test_tools_mid3iconv.TMid3Iconv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3iconv.py", line 60, in test_conv_basic
    res, out = self.call("-d", "-e", codec, self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3iconv", line 142, in main
    update(options, args)
  File "tools/mid3iconv", line 92, in update
    print id3.pprint().encode(enc, "replace")
LookupError: unknown encoding: 

======================================================================
ERROR: test_debug (tests.test_tools_mid3iconv.TMid3Iconv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3iconv.py", line 38, in test_debug
    res, out = self.call("-d", "-p", self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3iconv", line 142, in main
    update(options, args)
  File "tools/mid3iconv", line 92, in update
    print id3.pprint().encode(enc, "replace")
LookupError: unknown encoding: 

TMid3v2 (21):            EEEEEEE.EEE.E....EEE.                               7
======================================================================
ERROR: test_album (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 71, in test_album
    self._test_text_frame("-A", "--album", "TALB")
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 62, in _test_text_frame
    res, out = self.call(arg, new_value, self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_artist (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 68, in test_artist
    self._test_text_frame("-a", "--artist", "TPE1")
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 62, in _test_text_frame
    res, out = self.call(arg, new_value, self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_artist_escape (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 110, in test_artist_escape
    res, out = self.call("-e", "-a", "foo\\nbar", self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_comm1 (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 138, in test_comm1
    res, out = self.call("--COMM", "A", self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_comm2 (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 147, in test_comm2
    res, out = self.call("--COMM", "Y:B", self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_comm2_escape (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 156, in test_comm2_escape
    res, out = self.call("-e", "--COMM", "Y\\:B\\nG", self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_comm3 (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 165, in test_comm3
    res, out = self.call("--COMM", "Z:B:C:D:ger", self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_encoding_with_escape (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 178, in test_encoding_with_escape
    res, out = self.call("-e", "-a", text.encode(enc), self.filename)
LookupError: unknown encoding: 

======================================================================
ERROR: test_genre (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 77, in test_genre
    self._test_text_frame("-g", "--genre", "TCON")
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 62, in _test_text_frame
    res, out = self.call(arg, new_value, self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_invalid_encoding (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 182, in test_invalid_encoding
    res, out = self.call("--TALB", '\\xff', '-e', self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_list (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 44, in test_list
    res, out = self.call(arg, self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 347, in main
    list_tags(args)
  File "tools/mid3v2", line 240, in list_tags
    print id3.pprint().encode(enc, "replace")
LookupError: unknown encoding: 

======================================================================
ERROR: test_title (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 74, in test_title
    self._test_text_frame("-t", "--song", "TIT2")
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 62, in _test_text_frame
    res, out = self.call(arg, new_value, self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_txxx (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 129, in test_txxx
    res, out = self.call("--TXXX", "A\\:B:C", self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 

======================================================================
ERROR: test_txxx_escape (tests.test_tools_mid3v2.TMid3v2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools_mid3v2.py", line 119, in test_txxx_escape
    self.filename)
  File "/sw/build.build/mutagen-py27-1.22-2/mutagen-1.22/tests/test_tools.py", line 32, in call
    ret = self._main([self.TOOL_NAME] + list(args))
  File "tools/mid3v2", line 345, in main
    write_files(parser.edits, args, options.escape)
  File "tools/mid3v2", line 147, in write_files
    value = value.decode(enc)
LookupError: unknown encoding: 
*******

There were no test failures when testing mutagen-1.21 under identical build 
conditions.

Original issue reported on code.google.com by niederst...@gmail.com on 9 Sep 2013 at 7:25

GoogleCodeExporter commented 9 years ago
Thanks for reporting. Those test are new, so this isn't a regression.

Original comment by reiter.christoph@gmail.com on 10 Sep 2013 at 8:34

GoogleCodeExporter commented 9 years ago
Revision 8758088e4ed0

afaik setting lang should fix it:

$ export LANG=en_US.utf-8

Original comment by reiter.christoph@gmail.com on 10 Sep 2013 at 10:55

GoogleCodeExporter commented 9 years ago
Thanks.  Apparently the unprivileged user I was using to build mutagen didn't 
have LANG set.  With that set it passes all tests (couldn't test the actual 
patch because I couldn't figure out how to get a patch file for a specific 
changeset from the code.google interface).

Original comment by niederst...@gmail.com on 10 Sep 2013 at 11:38