Modify

Opened 10 years ago

Closed 8 months ago

Last modified 8 months ago

#2009 closed defect (wontfix)

UnicodeDecodeError

Reported by: matthias.runge@… Owned by: Anton Stroganov
Priority: normal Component: MantisImportScript
Severity: normal Keywords: UTF encoding mysql
Cc: Trac Release: 0.10

Description

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

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by dalemiller@…

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

comment:3 in reply to:  2 ; Changed 9 years ago by dalemiller@…

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.

comment:4 in reply to:  3 Changed 9 years ago by dalemiller@…

Replying to dalemiller@acm.org: 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.

comment:5 Changed 8 months ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

New version of plugin is on GitHub. Please open a new ticket if you have an issue with the new version.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Anton Stroganov.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.