[issue4382] test_dbm_dumb fails due to character encoding issue on Mac OS X

Martina Oefelein report at bugs.python.org
Fri Nov 21 23:16:59 CET 2008


Martina Oefelein <Martina at oefelein.de> added the comment:

Example of verbose output (other testcases are similar):

======================================================================
ERROR: test_dumbdbm_creation (test.test_dbm_dumb.DumbDBMTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/martina/Downloads/Python-
3.0rc3/Lib/test/test_dbm_dumb.py", line 41, in test_dumbdbm_creation
    f.close()
  File "/Users/martina/Downloads/Python-3.0rc3/Lib/dbm/dumb.py", line 
228, in close
    self._commit()
  File "/Users/martina/Downloads/Python-3.0rc3/Lib/dbm/dumb.py", line 
116, in _commit
    f.write("%r, %r\n" % (key.decode('Latin-1'), pos_and_siz_pair))
  File "./Lib/io.py", line 1491, in write
    b = encoder.encode(s)
  File "./Lib/encodings/mac_roman.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\xbc' in 
position 2: character maps to <undefined>

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4382>
_______________________________________


More information about the Python-bugs-list mailing list