Changes between Initial Version and Version 1 of Ticket #19098, comment 4


Ignore:
Timestamp:
Oct 10, 2012, 12:55:18 PM (12 years ago)
Author:
artamoshin

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19098, comment 4

    initial v1  
    11Replying to [comment:3 claudep]:
    22> Still in master, I see another way: do not call `repr()` on `self.urlconf_name` (which should be a proper unicode string). Can you test that?
    3 Formatting `u'%s' % self.urlconf_name` anyway call `repr()` implicitly. Python (at least 2.7) `repr(module)` always return __bytestring__ (not Unicode) like `<module 'modulename' from 'non/ascii/path/modulename.py'>`, which may contains codes >127. Next, implicit decoding while formatting using 'ascii' codec, that raises UnicodeDecodeError because it doesn't know what to do with that codes.
     3Formatting `u'%s' % self.urlconf_name` anyway call `repr()` implicitly. Python (at least 2.7) `repr(module)` always return __bytestring__ (not Unicode) like `<module 'modulename' from 'non/ascii/path/modulename.py'>`, which may contains codes >127. Next, implicit decoding while formatting uses 'ascii' codec, that raises UnicodeDecodeError because it doesn't know what to do with that codes.
Back to Top