Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#24 closed defect (invalid)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

Reported by: ak120 Owned by: Andreas Schnellbacher
Priority: minor Milestone: 2.0 beta
Component: Other Version: 1.16
Keywords: trac encoding Cc:

Description

Zum Reproduzieren

Während der Ausführung von GET auf /browser/trunk/src/nls/nlsdeu.rch hat Trac einen internen Fehler gemeldet.

(Bitte geben Sie hier weitere Details an)

Anfrageparameter:

{'path': u'/trunk/src/nls/nlsdeu.rch'}

User agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:38.0) Gecko/20100101 Firefox/38.0 SeaMonkey/2.35

Systeminformationen

Systeminformation nicht verfügbar

Aktive Plugins

Plugininformation nicht verfügbar

Python-Zurückverfolgungsinformationen

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/trac/web/main.py", line 554, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.7/site-packages/trac/web/main.py", line 247, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.7/site-packages/trac/versioncontrol/web_ui/browser.py", line 408, in process_request
    file_data = self._render_file(req, context, repos, node, rev)
  File "/usr/local/lib/python2.7/site-packages/trac/versioncontrol/web_ui/browser.py", line 669, in _render_file
    content = node.get_processed_content()
  File "/usr/local/lib/python2.7/site-packages/tracopt/versioncontrol/svn/svn_fs.py", line 802, in get_processed_content
    return FileContentStream(self, keyword_substitution, eol_style)
  File "/usr/local/lib/python2.7/site-packages/tracopt/versioncontrol/svn/svn_fs.py", line 1174, in __init__
    node._get_prop(core.SVN_PROP_KEYWORDS))
  File "/usr/local/lib/python2.7/site-packages/tracopt/versioncontrol/svn/svn_fs.py", line 1252, in _get_keyword_values
    for key, value in values.iteritems())
  File "/usr/local/lib/python2.7/site-packages/tracopt/versioncontrol/svn/svn_fs.py", line 1252, in <genexpr>
    for key, value in values.iteritems())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

Change History (6)

comment:1 by Andreas Schnellbacher, 7 years ago

Keywords: trac encoding added
Milestone: Unsorted2.0 beta
Owner: set to Andreas Schnellbacher
Priority: majorminor
Status: newaccepted

I've seen that myself. It happens since Trac was updated. For non-Unicode encoding Trac defaults to ASCII, which supports only 127 chars. Files that contain other chars like Umlauts or IBM frame chars lead to the described error (instead of simply displaying these files).

That doesn't happen on checking these files out with svn or on browsing the repository.

I'm still not sure how to handle this. I think the best solution is to assign cp850 to each file.

Last edited 7 years ago by Andreas Schnellbacher (previous) (diff)

comment:2 by Andreas Schnellbacher, 7 years ago

BTW: The file nlsdeu.rch contains only ASCII chars. The error message seems to be just wrong. Now I understand why the net is full of reports about that bahavior.

comment:3 by erdmann, 7 years ago

There is nothing that can be done about this error (at least that's what Adrian Gschwend told me). This error exists for every Netlabs repository. Strange enough, it only exists for "old" revisions of files, at least that's true for the USB repo.
I assume that if a repo was created before the change in TRAC that all these repos are affected.

Last edited 7 years ago by erdmann (previous) (diff)

comment:4 by Andreas Schnellbacher, 7 years ago

Resolution: invalid
Status: acceptedclosed

Thanks, Lars. I found that a few old files behave OK, but no newer file.

Resolving this as invalid, because it's caused by Trac or a plugin.

comment:5 by Andreas Schnellbacher, 7 years ago

Because many other projects are not affected, I have now the idea that this may be caused by setting:

svn propset -R svn:keywords "Date Revision Author HeadURL Id" *

to fill the $Id:...$ line (from CVS) with data.

comment:6 by Andreas Schnellbacher, 7 years ago

An last addition: On netlabs.org trac, no .cmd file can be viewed. That doesn't depend on the project.

Things like this show that the problem lies on the trac server side. I can't do anything within the project.

Note: See TracTickets for help on using tickets.