On Nov 13, Joachim Selke <[EMAIL PROTECTED]> wrote:
> I'm trying to import IMDB data into a DB2 database using the
> imdbpy2sql.py script.
Hi, and thank you for the bug report (I've added your name to
the credits).
> First, I get the following two errors, which can be fixed
> individually by commenting out the corresponding lines in
> imdbpy2sql.py:
I hope to have fixed these in the CVS; can you get the latest version
and try it?
Let me know if in the output there are warnings like
"Unable to import OperationalError" (or "IntegrityError").
> The thrid error I get is critical. I wasn't able to resolve it yet
> (unfortunately, I don't know Python and IMDbPY well enough to do so):
I don't have access to a DB2 database, so I hope you can assist me
debugging this problem.
Please try to run the following test and let me know which variations
of the cursor.execute call work (if any):
========================================================
#!/usr/bin/env python
import ibm_db_dbi
# Insert your configuration, here!
connection = ibm_db_dbi.connect(dsn, user, password, host, database)
cursor = connection.cursor()
# Try these variations; beware that 'kind' is an UNIQUE column, so
# the first one to succeed may break the others (i.e.: try it one at
# a time, and be sure that the 'kind_type' table is empty, before you
# run this script.
cursor.execute('INSERT INTO kind_type (kind) VALUES (?)', [u'movie'])
cursor.execute('INSERT INTO kind_type (kind) VALUES (?)', (u'movie',))
cursor.execute('INSERT INTO kind_type (kind) VALUES (?)', ['movie'])
cursor.execute('INSERT INTO kind_type (kind) VALUES (?)', ('movie',))
========================================================
If they all fail, another thing you can try is to upgrade you SQLAlchemy
to the 5.0 branch, in the svn repository:
svn checkout http://svn.sqlalchemy.org/sqlalchemy/trunk sqlalchemy
Thanks!
--
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Imdbpy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel