Roundup Tracker - Issues

Issue 2550624

classification
version 1.4.7, 1.4.8 and 1.4.9: UnicodeDecodeError: 'utf8' codec can't decode bytes
Type: Severity: critical
Components: Installation, Install Problem (example) Versions: 1.4
process
Status: closed invalid
:
: : radioking, richard
Priority: :

Created on 2010-01-06 22:32 by radioking, last changed 2010-01-09 23:51 by richard.

Messages
msg3970 Author: [hidden] (radioking) Date: 2010-01-06 22:32
After having installed version 1.4.7 from python.org,

starting the server
or
roundup-admin -v
or
roundup-server -v

(e.g.)

leads to error

######################################################
Traceback (most recent call last):
  File "/usr/bin/roundup-admin", line 2, in <module>
    from roundup.scripts.roundup_admin import run
  File
"/usr/lib/python2.5/site-packages/roundup/scripts/roundup_admin.py",
line 27, in <module>
    from roundup.admin import AdminTool
  File "/usr/lib/python2.5/site-packages/roundup/admin.py", line 27, in
<module>
    from roundup import date, hyperdb, roundupdb, init, password, token
  File "/usr/lib/python2.5/site-packages/roundup/date.py", line 34, in
<module>
    from roundup import i18n
  File "/usr/lib/python2.5/site-packages/roundup/i18n.py", line 222, in
<module>
    translation = get_translation()
  File "/usr/lib/python2.5/site-packages/roundup/i18n.py", line 212, in
get_translation
    translator = translation_class(open(mofiles[0], "rb"))
  File "/usr/lib/python2.5/gettext.py", line 180, in __init__
    self._parse(fp)
  File "/usr/lib/python2.5/gettext.py", line 337, in _parse
    tmsg = unicode(tmsg, self._charset)
  File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 176-178:
invalid data
######################################################



I did NOT YET follow migration notes from...

http://roundup-tracker.org/docs/upgrading.html#migrating-from-1-4-x-to-1-4-7

...but I doubt this will have an effect to the utf8-error shown.
msg3971 Author: [hidden] (radioking) Date: 2010-01-06 22:43
Found a discussion with similar Error:

http://www.mail-archive.com/python-list@python.org/msg147332.html


And a roundup-related thread...
http://bugs.gentoo.org/show_bug.cgi?format=multiple&id=262100

...which links to
http://issues.roundup-tracker.org/issue2550546


That issue is about version 1.4.8, but I will try to reproduce the
solution shown with my version 1.4.7.
msg3972 Author: [hidden] (radioking) Date: 2010-01-06 22:54
Line 13 of file 

reads

###############################################
"PO-Revision-Date: 2009-03-12 18:05Westeuropäische Normalzeit\n"
###############################################

I modified the letter "ä" to "ae".

This approach doesn't work and prevents re-installation of 1.4.7 with
the very same error message as just starting the server.


Will now try obtaining single file de.po from SVN-repository.
msg3973 Author: [hidden] (radioking) Date: 2010-01-06 23:08
Obtaining full revision 4272 (seems to be a 1.4.8 version) by

sudo svn co -r4272
http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk

and copying just the file "de.po" to the 1.4.7 install files did not help.
msg3975 Author: [hidden] (radioking) Date: 2010-01-07 00:57
Additionally copying the fr.po file from r4300 to
version 1.4.7's folder locale did not help either.


Further tests...


I tracked the error source to file  i18n.py


Modifying

line 
############################################
        translator = translation_class(open(mofiles[0], "rb"))
############################################

to

############################################
        translator = null_translation_class()
############################################

makes installation succeed.



Remarks:

There must have been something changed by this hack, though...
Seems translation is broken by that- only English frontend is used, now.


mofiles[0] refers to a binary file
/usr/share/locale/en/LC_MESSAGES/roundup.mo
which I can't interprete...

Is there a way to avoid that utf8-error?
How can I dig deeper for the source of the error?
msg3976 Author: [hidden] (radioking) Date: 2010-01-07 01:09
had to use the hack again to get version 1.4.8 installing
msg3977 Author: [hidden] (radioking) Date: 2010-01-07 01:14
had to use the hack again to get version 1.4.9 installing
msg3978 Author: [hidden] (radioking) Date: 2010-01-07 01:29
BTW: Version 1.4.10 seems fine without modification...
msg3990 Author: [hidden] (richard) Date: 2010-01-09 23:51
Please only report bugs for the latest version, thanks.

It is not necessary to install every version of Roundup when upgrading to 
the latest version.
History
Date User Action Args
2010-01-09 23:51:00richardsetstatus: new -> closed
resolution: invalid
messages: + msg3990
nosy: + richard
2010-01-07 01:29:39radiokingsetmessages: + msg3978
2010-01-07 01:14:26radiokingsetmessages: + msg3977
title: version 1.4.7 and 1.4.8: UnicodeDecodeError: 'utf8' codec can't decode bytes -> version 1.4.7, 1.4.8 and 1.4.9: UnicodeDecodeError: 'utf8' codec can't decode bytes
2010-01-07 01:09:44radiokingsetmessages: + msg3976
title: version 1.4.7: UnicodeDecodeError: 'utf8' codec can't decode bytes -> version 1.4.7 and 1.4.8: UnicodeDecodeError: 'utf8' codec can't decode bytes
2010-01-07 00:57:14radiokingsetmessages: + msg3975
2010-01-06 23:08:06radiokingsetmessages: + msg3973
2010-01-06 22:54:56radiokingsetmessages: + msg3972
2010-01-06 22:43:31radiokingsetmessages: + msg3971
2010-01-06 22:32:03radiokingcreate