davglass / trac2issues

Trac to GitHub Issues import script
Other
16 stars 7 forks source link

Failure importing tickets (with ascii 18..36 in comments?) #3

Open johan opened 15 years ago

johan commented 15 years ago

A second try importing the trac environment http://www.lysator.liu.se/~jhs/greasemonkey.trac.zip to an empty github issue tracker (this time without most of the command line flags), aborts on this error:

sudo ./trac2issues.py -p greasemonkey -x -u http://greasemonkey.devjavu.com -t /var/trac/greasemonkey [...] Adding comment to issue # 3 Traceback (most recent call last): File "./trac2issues.py", line 250, in ImportTickets() File "./trac2issues.py", line 67, in init self._fetchTickets() File "./trac2issues.py", line 141, in _fetchTickets self.createIssue(data) File "./trac2issues.py", line 187, in createIssue self.addComment(num, comment) File "./trac2issues.py", line 214, in addComment data = urllib.urlencode(out) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 1265, in urlencode v = quote_plus(str(v)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-36: ordinal not in range(128)