-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
On 26-Jan-2007, at 6:47pm, pottingerhj wrote (Trac issue 1150):
-
a minor annoyance: an extra slash is required at the end of the trac env path, which isn't standard practice; the example given of /path/to/trac/env is wrong.
-
after fixing 1 above, running the script gets me all the way to step 2:
2. import components...
sql: SELECT category, user_id as owner FROM mantis_project_category_table WHERE project_id '3' or project_id '5' or project_id '7' or project_id '9' or project_id = '10'
Adding user hardy to sessions table
Traceback (most recent call last):
File "./mantis2trac.py", line 926, in ?
main()
File "./mantis2trac.py", line 923, in main
convert(MANTIS_DB, MANTIS_HOST, MANTIS_USER, MANTIS_PASSWORD, TRAC_ENV, TRAC_CLEAN)
File "./mantis2trac.py", line 578, in convert
component['owner'] = trac.getLoginName(mysql_cur, component['owner'])
File "./mantis2trac.py", line 467, in getLoginName
print 'could not insert %s into sessions table: sql error %s ' % loginName, self.db().error()
After some debugging, I discover that:
AttributeError: 'pysqlite2.dbapi2.Connection' object has no attribute 'error'
So I drop the fancy error reporting and just see what error Python will throw:
pysqlite2.dbapi2.OperationalError: near "IGNORE": syntax error
According the SQLite page, that is indeed incorrect syntax. Lines 462 and 470 should read "INSERT OR IGNORE" not "INSERT IGNORE".
So, after correcting these lines, I receive this error:
2. import components...
sql: SELECT category, user_id as owner FROM mantis_project_category_table WHERE project_id '3' or project_id '5' or project_id '7' or project_id '9' or project_id = '10'
Adding user hardy to sessions table
Traceback (most recent call last):
File "./mantis2trac.py", line 926, in ?
main()
File "./mantis2trac.py", line 923, in main
convert(MANTIS_DB, MANTIS_HOST, MANTIS_USER, MANTIS_PASSWORD, TRAC_ENV, TRAC_CLEAN)
File "./mantis2trac.py", line 578, in convert
component['owner'] = trac.getLoginName(mysql_cur, component['owner'])
File "./mantis2trac.py", line 474, in getLoginName
(result[0]['username'].encode('utf-8'), '1', 'name', result[0]['realname'].encode('utf-8'),
File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 47, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "/usr/lib/python2.3/site-packages/trac/db/sqlite_backend.py", line 56, in execute
args or [])
File "/usr/lib/python2.3/site-packages/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
return function(self, *args, **kwargs)
pysqlite2.dbapi2.OperationalError: near ",": syntax error
And, unfortunately, my debug abilities have hit a wall. I'm not sure what might be the problem, so I'm throwing this out there, to see if anyone might be able to help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels