-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple errors on running mantis2trac.py with Mantis 1.0.1 and Trac 0.10 #5
Comments
On 6-Feb-2007, at 9:34pm, anonymous wrote (Trac issue 1150#comment:1):Had the exact same problems as you did...they seem to have been introduced in the latest version [1724] . I got the previous version [1721] from the following link and it worked great: http://trac-hacks.org/browser/mantisimportscript/mantis2trac.py?rev=1721&format=raw |
On 6-Feb-2007, at 10:42pm, @Aeon wrote (Trac issue 1150#comment:2):It's complaining because sqlite doesn't support mutliple insert statements like sql does. Try the new revision (r1927) (I split up the session attribute insert into separate queries and removed the 'IGNORE' part (not sure how to cleanly make alternate sql syntax depending on whether the trac is running a MySQL or SQLite backend. |
On 7-Feb-2007, at 9:17pm, anonymous wrote (Trac issue 1150#comment:3):Tried the new revision (r1927). No luck, here's the error:
|
On 7-Feb-2007, at 10:00pm, @Aeon wrote (Trac issue 1150#comment:4):(In [1929]) MantisImportScript: second try to fix #1150 |
On 7-Feb-2007, at 10:02pm, @Aeon wrote (Trac issue 1150#comment:5):Try now. I didn't actually test my commit last night (yeah, I know, bad bad...) Tested the fix now, should be working correctly. Thanks! |
On 8-Feb-2007, at 5:41pm, anonymous wrote (Trac issue 1150#comment:6):still no luck with the new revision (r1929):
|
On 8-Feb-2007, at 7:37pm, @Aeon wrote (Trac issue 1150#comment:7):What the... looks like the sqlite wrapper doesn't provide us with an error() function... grrr. How large is your mantis db dump? Can you attach it to this ticket so I can test it? Alternatively, can you go into sqlite3 prompt and run the sql query that it's erroring on, to see if you can get a more intelligible error statement?
|
On 8-Feb-2007, at 7:38pm, @Aeon wrote (Trac issue 1150#comment:8):Er, that should be
|
On 8-Feb-2007, at 10:21pm, anonymous wrote (Trac issue 1150#comment:9):I'm not comfortable posting my db dump. However, I did follow the advice of comment 1, and reverted back to r1721. Needed to also turn off the TIME_ADJUSTMENT_HACK and set the defaultencoding to latin-1, but the script ran fine. Looking forward to seeing what I've got in my trac db now. I'd be willing to share a dump file of my mantis MySQL db via some other method, if you'd like to tinker. I just don't want it available to the world. |
On 8-Feb-2007, at 10:29pm, @Aeon wrote (Trac issue 1150#comment:10):No problem. It's really a minor part of the script that's causing all this trouble; more for convenience than anything else. If you like, email me your mantis dump at aeontech at gmail dot com, I'll poke it with a stick, see what I can turn up. The script is running fine against trac on a mysql backend, not sure why it's having so much trouble with sqlite. |
On 28-Mar-2007, at 3:32pm, david wrote (Trac issue 1150#comment:11):I'm seeing pretty much the same thing here (though I should admit up front that I'm working on Windows, which may or may not make any difference.) Mantis database is from 0.19.x, imported into MySQL 5.0.37 no problem; using trac 0.10 with pysqlite-2.3.3.win32-py2.4.exe, set up the trac environment ok, ie database connection is the default sqlite:db/trac.db. Using latest mantis2trac r1929 (with TRAC_CLEAN option disabled cos windows doesn't understand 'rm' though I was regularly nuking the trac installation to make sure things were clean), I get pretty much the same as anonymous on 9 Feb:
However, I had no luck with the suggested comment 1 approach of reverting to r1721 etc, although it did get further:
... which made me think briefly that the TIME_ADJUSTMENT_HACK would save me, but it didn't. So, seeing the remarks about pysqlite cf mysql, I followed http://trac.edgewall.org/wiki/MySqlDb and I created the trac database within MySQL. Reran the trac environment initialisation with the database connection string set to: mysql://root:password@localhost/trac Tried again with r1929 and got essentially the same as with pysqlite:
For completeness, tried the r1721 approach too:
So I'm now stuck. I've tried all the combinations I can think of and have reached the limit of my understanding of what's going on. Hope this helps?! |
On 13-Sep-2007, at 7:19am, sngautam wrote (Trac issue 1150#comment:12):I get this error:
|
On 23-Nov-2007, at 2:43pm, The Fixer wrote (Trac issue 1150#comment:13):Hi, all places with (BTW: Furtermore, I had to replace all 'utf-8' with 'latin1' to make it work with all my used German umlauts. Maybe this should be made configurable as script command line argument...) |
On 26-Nov-2007, at 8:28am, The Fixer wrote (Trac issue 1150#comment:14):Hmm...now with that 'INSERT OR IGNORE ticket_change' it converts well but I get a runtime-error:
What can I do now? sigh (Hmm...and, please, forget the comment about using of 'latin1' because 'utf-8' was correct. Before the mantis2trac script call I had to convert my database to utf-8. Because trac can only handle utf-8.) |
On 26-Nov-2007, at 8:30am, The Fixer wrote (Trac issue 1150#comment:15):The whole thing seems to be related to ticket #5278 |
On 26-Nov-2007, at 8:31am, The Fixer wrote (Trac issue 1150#comment:16):Hmm... #5278 is here |
On 27-Nov-2007, at 7:21pm, The Fixer wrote (Trac issue 1150#comment:17):I tried this and converting and web-gui to the tickets run fine now. Thanks to [email protected]! :-) I think this ticket can be closed now. |
On 7-Dec-2007, at 8:44am, sngautam wrote (Trac issue 1150#comment:18):I'm still facing the same problem. I used the patched script given in #5855 ++++ This is my error message. |
On 17-Jul-2012, at 11:21am, @Aeon wrote (Trac issue 1150#comment:19):The Fixer is right, it's due to the Trac ticket #5278. I don't have a test database to test with right now, but the latest code is now on github, please feel free to submit patches. |
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:
After some debugging, I discover that:
So I drop the fancy error reporting and just see what error Python will throw:
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:
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.
The text was updated successfully, but these errors were encountered: