#12560 closed defect (fixed)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9f in position 36: ordinal not in range(128)
| Reported by: | Lukasz | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.13 |
| Component: | version control/browser | Version: | 1.1.6 |
| Severity: | normal | Keywords: | svn |
| Cc: | lukasz.matecki@… | Branch: | |
| Release Notes: |
Fixed |
||
| API Changes: | |||
| Internal Changes: | |||
Description
How to Reproduce
While doing a GET operation on /browser/tags/--PRIVATE-DATA-REMOVED---, Trac issued an internal error.
(please provide additional details here)
My observation: the file processed has a Date SVN keyword which, after substitution, expands to non-ascii string (Polish "Paź." for month name).
Request parameters:
{u'format': u'zip', 'path': u'/tags/--PRIVATE-DATA-REMOVED---', u'rev': u'1154'}
User agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
System Information
Trac | 1.1.6
|
Babel | 0.9.6
|
Genshi | 0.7 (without speedups)
|
Pygments | 1.6
|
pysqlite | 2.6.0
|
Python | 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)]
|
pytz | 2011c
|
RPC | 1.1.5
|
setuptools | 12.0.1
|
SQLite | 3.6.21
|
Subversion | 1.7.5 (r1336830)
|
jQuery | 1.8.3
|
jQuery UI | 1.9.2
|
jQuery Timepicker | 1.1.1
|
Enabled Plugins
tracfilelist | 0.1
|
trachtmlnotificationplugin | 0.12.0.1
|
tracticketreferenceplugin | 0.5.0
|
tracxmlrpc | 1.1.5
|
Interface Customization
| shared-htdocs | |
| shared-templates | |
| site-htdocs | doxygen, trac, viresco_00.jpg
|
| site-templates |
Python Traceback
Traceback (most recent call last):
File "c:\Python27\lib\site-packages\trac\web\main.py", line 587, in _dispatch_request
dispatcher.dispatch(req)
File "c:\Python27\lib\site-packages\trac\web\main.py", line 246, in dispatch
resp = chosen_handler.process_request(req)
File "c:\Python27\lib\site-packages\trac\versioncontrol\web_ui\browser.py", line 402, in process_request
self._render_zip(req, context, repos, node, rev)
File "c:\Python27\lib\site-packages\trac\versioncontrol\web_ui\browser.py", line 659, in _render_zip
render_zip(req, filename, repos, root_node, self._iter_nodes)
File "c:\Python27\lib\site-packages\trac\versioncontrol\web_ui\util.py", line 213, in render_zip
data = node.get_processed_content(eol_hint='CRLF').read()
File "c:\Python27\lib\site-packages\tracopt\versioncontrol\svn\svn_fs.py", line 803, in get_processed_content
return FileContentStream(self, keyword_substitution, eol_style)
File "c:\Python27\lib\site-packages\tracopt\versioncontrol\svn\svn_fs.py", line 1175, in __init__
node._get_prop(core.SVN_PROP_KEYWORDS))
File "c:\Python27\lib\site-packages\tracopt\versioncontrol\svn\svn_fs.py", line 1253, in _get_keyword_values
for key, value in values.iteritems())
File "c:\Python27\lib\site-packages\tracopt\versioncontrol\svn\svn_fs.py", line 1253, in <genexpr>
for key, value in values.iteritems())
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9f in position 36: ordinal not in range(128)
Attachments (0)
Change History (4)
comment:1 by , 9 years ago
| Component: | general → version control/browser |
|---|---|
| Keywords: | svn added |
| Milestone: | → 1.0.13 |
| Owner: | set to |
| Status: | new → assigned |
comment:2 by , 9 years ago
Yes, me too. I'm having many problems because of that. Depending on client this gets expanded differently (in eclipse it is always English, in command line / Tortoise its Polish). It even gets expanded differently in the same language (different casing for months in Polish).
comment:4 by , 9 years ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Committed in [15055] and merged in [15056-15057].



Thanks for the reporting. This issue is caused by expanding
%aand%bto non-utf8 bytes on Windows. I thinkDateinsvn:keywordsshouldn't be depended on locale.