Changes between Initial Version and Version 1 of Ticket #19098, comment 4
- Timestamp:
- Oct 10, 2012, 12:55:18 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19098, comment 4
initial v1 1 1 Replying to [comment:3 claudep]: 2 2 > 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 us ing'ascii' codec, that raises UnicodeDecodeError because it doesn't know what to do with that codes.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 uses 'ascii' codec, that raises UnicodeDecodeError because it doesn't know what to do with that codes.