UnicodeDecodeError
Aeon opened this issue · comments
On 6-Sep-2007, at 8:09am, @mrunge wrote (Trac issue 2009):
During import on RHEL4
cleaning all tickets...
0. Finding project IDs...
Traceback (most recent call last):
File "./mantis2trac.py", line 943, in ?
main()
File "./mantis2trac.py", line 940, in main
convert(MANTIS_DB, MANTIS_HOST, MANTIS_USER, MANTIS_PASSWORD, TRAC_ENV, TRAC_CLEAN)
File "./mantis2trac.py", line 575, in convert
mysql_cur.execute(sql)
File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 163, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 3-8: unsupported Unicode code range
Further information:
Mantis Version 1.0.7
Trac 0.10.4, MySQL Database
On 29-May-2008, at 1:56pm, dalemiller wrote (Trac issue 2009#comment:1):
I had errors using the mantis2trac.py script that was available in the trac and trac-hacks repositories. They both are v1.3 in the comments at the top of the file.
There is an attachment on ticket #5855 at the trac homepage containing a v1.4 that I found worked. [http://trac.edgewall.org/attachment/ticket/5855/mantis2py.patch]
It is actually not a patch but the complete file. Someone needs to commit this version into the repository. I tried to add the attachment here but it was ejected.
I got the file by selecting all the lines of the file as it was displayed using the URL in the preceding paragraph. Then I pasted it into xemacs and did a "kill-rectangle" on the line numbers. I also had to remove a trailing space behind two continued lines "\ " for it to work.
This is the configuration that I have working:
Trac: 0.11rc1
Python: 2.5.1 (r251:54863, Sep 21 2007, 22:46:31) [GCC 4.2.1 (SUSE Linux)]
setuptools: 0.6c8
MySQL: server: "5.0.45", client: "5.0.45", thread-safe: 0
MySQLdb: 1.2.2
Genshi: 0.4.4
mod_python: 3.3.1
Subversion: 1.4.4 (r25188)
jQuery: 1.2.3
On 29-May-2008, at 2:04pm, dalemiller wrote (Trac issue 2009#comment:3):
Sorry about the previous reply. I tried adding Mantis to the configuration list.
We have Mantis 1.1.1 that converted well using v1.4 of as discussed above.
On 29-May-2008, at 2:28pm, dalemiller wrote (Trac issue 2009#comment:4):
One additional note. v1.3 worked for me when using PySQLite but it did not when I tried to convert to MySQL. v1.4 worked for the MySQL conversion.
I guess this just can be closed. The software is ancient.