Modify

Opened 9 years ago

Closed 9 years ago

#12421 closed defect (cantfix)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

Reported by: anonymous Owned by:
Priority: normal Component: SELECT A HACK
Severity: normal Keywords:
Cc: Trac Release:

Description

Zum Reproduzieren

Während der Ausführung von POST auf /prefs/advanced hat Trac einen internen Fehler gemeldet.

(Bitte geben Sie hier weitere Details an)

Anfrageparameter:

{'__FORM_TOKEN': u'8c512ffaca0d02ca39e744b1',
 'loadsid': u'\U0001f4f6\U0001f4f6\U0001f4f6',
 'newsid': u'd1c3ec603107e509509dac3c',
 'panel_id': u'advanced',
 'restore': u'Laden'}

User agent: Mozilla/5.0 (Linux; Android 4.4.2; Endeavour_101L Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36

Systeminformationen

Systeminformation nicht verfügbar

Aktive Plugins

Plugininformation nicht verfügbar

Python-Zurückverfolgungsinformationen

Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.6post2-py2.6.egg/trac/web/main.py", line 534, in _dispatch_request
    dispatcher.dispatch(req)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.6post2-py2.6.egg/trac/web/main.py", line 227, in dispatch
    resp = chosen_handler.process_request(req)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.6post2-py2.6.egg/trac/prefs/web_ui.py", line 80, in process_request
    template, data = chosen_provider.render_preference_panel(req, panel_id)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.6post2-py2.6.egg/trac/prefs/web_ui.py", line 101, in render_preference_panel
    self._do_load(req)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.6post2-py2.6.egg/trac/prefs/web_ui.py", line 175, in _do_load
    req.session.get_session(oldsid)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.6post2-py2.6.egg/trac/web/session.py", line 239, in get_session
    self.bake_cookie()
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.6post2-py2.6.egg/trac/web/session.py", line 219, in bake_cookie
    self.req.outcookie[COOKIE_KEY] = self.sid
  File "/usr/lib/python2.6/Cookie.py", line 586, in __setitem__
    rval, cval = self.value_encode(value)
  File "/usr/lib/python2.6/Cookie.py", line 675, in value_encode
    strval = str(val)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by Ryan J Ollos

Resolution: cantfix
Status: newclosed

Only ascii characters should be used for the session key.

However, perhaps a TracError should be raised rather than a UnicodeEncodeError with a traceback. See trac:comment:4:ticket:11319.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.