Hi,

I'm trying to import IMDB data into a DB2 database using the
imdbpy2sql.py script. I tried the lastest release of IMDbPY (3.8) as
well as the CVS version. In both cases, I get some error messages when
running the following command:

imdbpy2sql.py -d DATADIR -u "ibm_db_sa://USER:[EMAIL PROTECTED]:50000/DB" -o
sqlalchemy

First, I get the following two errors, which can be fixed individually
by commenting out the corresponding lines in imdbpy2sql.py:

| Traceback (most recent call last):
|   File "/home/selke/Desktop/imdb/IMDbPY/usr/bin/imdbpy2sql.py", line
256, in <module>
|     OperationalError = conn.module.OperationalError
| AttributeError: 'Connection' object has no attribute 'OperationalError'

| Traceback (most recent call last):
|   File "/home/selke/Desktop/imdb/IMDbPY/usr/bin/imdbpy2sql.py", line
257, in <module>
|     IntegrityError = conn.module.IntegrityError
| AttributeError: 'Connection' object has no attribute '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):

| RUNNING imdbpy2sql.py
| SAVING imdbID values for movies... SKIPPING: no data.
| SAVING imdbID values for people... DONE! (0 entries)
| SAVING imdbID values for characters... DONE! (0 entries)
| SAVING imdbID values for companies... DONE! (0 entries)
| DROPPING current database... DONE!
| CREATING new tables...
| Traceback (most recent call last):
|   File "/home/selke/Desktop/imdb/IMDbPY/usr/bin/imdbpy2sql.py", line
2136, in <module>
|     run()
|   File "/home/selke/Desktop/imdb/IMDbPY/usr/bin/imdbpy2sql.py", line
1999, in run
|     createTables(DB_TABLES)
|   File
"/usr/lib64/python2.5/site-packages/imdb/parser/sql/dbschema.py", line
319, in createTables
|   File
"/home/selke/Desktop/imdb/IMDbPY/usr/lib64/python2.5/site-packages/imdb/parser/sql/alchemyadapter.py",
line 316, in __call__
|     self._ta_insert.execute(*args, **kwds)
|   File
"/usr/lib/python2.5/site-packages/sqlalchemy/sql/expression.py", line
1087, in execute
|     return e.execute_clauseelement(self, multiparams, params)
|   File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py",
line 1219, in execute_clauseelement
|     return connection.execute_clauseelement(elem, multiparams, params)
|   File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py",
line 895, in execute_clauseelement
|     return self._execute_compiled(elem.compile(dialect=self.dialect,
column_keys=keys, inline=len(params) > 1), distilled_params=params)
|   File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py",
line 907, in _execute_compiled
|     self.__execute_raw(context)
|   File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py",
line 916, in __execute_raw
|     self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
|   File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py",
line 960, in _cursor_execute
|     self._handle_dbapi_exception(e, statement, parameters, cursor)
|   File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py",
line 942, in _handle_dbapi_exception
|     raise exceptions.DBAPIError.instance(statement, parameters, e,
connection_invalidated=is_disconnect)
| sqlalchemy.exceptions.DatabaseError: (DatabaseError)
ibm_db_dbi::DatabaseError: Binding Error:  'INSERT INTO kind_type (kind)
VALUES (?)' [u'movie']


When I look into the DB2 database after this error, the following tables
have been created successfully (but are still empty):

char_name
company_name
kind_type
name

Can you give me some hints on how to fix this error?


My software:
Linux (Fedora 9)
Python 2.5.1
SQLAlchemy 0.4.7 (comes with Fedora)
ibm_db_sa adapter for SQLAlchemy 0.4 (installed manually)
ibm_db Python driver & DB-API wrapper 0.4.1 (installed manually)
IBM DB2 9.5 Fixpack 2a (current version)


Best,
Joachim
-- 
M. Sc. Joachim Selke
Technische Universität Braunschweig, Institut für Informationssysteme
Mühlenpfordtstraße 23, 38106 Braunschweig, Germany
<http://www.l3s.uni-hannover.de/~selke>

-------------------------------------------------------------------------
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
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to