Roundup Tracker - Issues

Issue 2507266

classification
UnicodeDecodeError
Type: Severity: normal
Components: Web interface Versions: 1.4
process
Status: closed
:
: richard : agthorr, alessandro, poeml, richard, rouilj
Priority: normal :

Created on 2009-01-14 15:43 by agthorr, last changed 2016-06-28 01:22 by rouilj.

Messages
msg2602 Author: [hidden] (agthorr) Date: 2009-01-14 15:43
I got the traceback below from roundup when an Italian user viewed an issue.  When I view the same URL, I have no problem.  My best guess is that the user has a non-ASCII character in one of the variables sent along by HTTP, causing Roundup to explode when it tries to decode the string.

The URL in question is: http://pokersleuth.com/tracker/issue2

For the case where roundup threw an exception, the referrer and the user's browser are:

"http://www.google.it/search?hl=it&q=GetDefaultBrowserPath&btnG=Cerca+con+Google&meta=&aq=f&oq=" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5"

Finally, here's the traceback:

Traceback (most recent call last):

 File "/usr/local/lib/python2.5/site-packages/roundup/cgi/client.py", line 435, in inner_main
   self.write_html(self.renderContext())

 File "/usr/local/lib/python2.5/site-packages/roundup/cgi/client.py", line 930, in renderContext
   return cgitb.pt_html(i18n=self.translator)

 File "/usr/local/lib/python2.5/site-packages/roundup/cgi/cgitb.py", line 76, in pt_html
   s = _('A problem occurred in your template "%s".') \

 File "/usr/local/lib/python2.5/site-packages/roundup/cgi/TranslationService.py", line 41, in gettext
   return msgtrans.encode(self.OUTPUT_ENCODING)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
msg3525 Author: [hidden] (alessandro) Date: 2009-02-08 11:38
I have the same issue.
Roundup 1.4.6 ver. from tgz, locally installed on my own computer.
Same error with 1.4.4-4 ver. (debian sid, version from official repository)
The error doesn't exist in the 1.2.1-5-etch2 version (debian etch,
version from official repository)

For me it's impossibile to use it with debian sid, I always get this
error message.

I'have installed mydebian with english language as default, but roundup
is trying to render an italian page (I'm from Italy: roundup is reading
my timezone or similar?)

Here my locales
#:~/test/roundup/roundup-1.4.6$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I have inserted a print in TranslationService.py, line 41:
  ...
  msgtrans=self.ugettext(msgid)
  print msgtrans, type(msgtrans), self.OUTPUT_ENCODING # <<==
  return msgtrans.encode(self.OUTPUT_ENCODING)
  ...

Here the result:

<html><head><title>È accaduto un errore</title></head>
<body><h1>È accaduto un errore</h1>
<p>È accaduto un errore mentre veniva processata la richiesta.
La notifica del problema è stata notificata al manutentore del tracker.</p>
</body></html> <type 'str'> utf-8
msg3526 Author: [hidden] (alessandro) Date: 2009-02-08 12:05
temporary workaround: remove the
"/usr/share/locale/it/LC_MESSAGES/roundup.mo" file (or move it elsewhere).

Roundup will work, but it will render english pages to italian users.
msg5670 Author: [hidden] (rouilj) Date: 2016-06-28 01:22
In issue2414044 a similar issue is reported. It looks like it was fixed
later in the 1.4 series with an update to the italian translation file.

So I am closing this.
History
Date User Action Args
2016-06-28 01:22:53rouiljsetstatus: open -> closed
nosy: + rouilj
messages: + msg5670
2009-10-06 18:36:50poemlsetnosy: + poeml
2009-02-08 12:05:09alessandrosetmessages: + msg3526
2009-02-08 11:38:01alessandrosetnosy: + alessandro
messages: + msg3525
versions: + 1.4
2009-01-14 15:43:21agthorrcreate