Thanks for your quick response, Davide.

However, when I tried sqlalchemy using the following command:
python imdbpy2sql.py -d [imdb_file_directory] -o sqlalchemy -u
'mysql://user:password@localhost/imdb?charset=utf8&local_infile=1'

I got the following error.

Traceback (most recent call last):
  File "imdbpy2sql.py", line 538, in <module>
    conn = setConnection(URI, DB_TABLES)
  File
"/Library/Python/2.7/site-packages/IMDbPY-5.1-py2.7-macosx-10.12-intel.egg/imdb/parser/sql/alchemyadapter.py",
line 489, in setConnection
    engine = create_engine(uri, **params)
  File "/Library/Python/2.7/site-packages/sqlalchemy/engine/__init__.py",
line 387, in create_engine
    return strategy.create(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/sqlalchemy/engine/strategies.py",
line 160, in create
    engineclass.__name__))
TypeError: Invalid argument(s) 'local_infile' sent to create_engine(),
using configuration MySQLDialect_mysqldb/QueuePool/Engine.  Please check
that the keyword arguments are appropriate for this combination of
components.

I was using sqlalchemy version 1.1.8. I received the same error when I
switched to sqlalchemy version 0.5. And when I switched to sqlalchemy 0.4,
I received this error:

Traceback (most recent call last):
  File "imdbpy2sql.py", line 323, in <module>
    from imdb.parser.sql.alchemyadapter import getDBTables, setConnection
  File
"/Library/Python/2.7/site-packages/IMDbPY-5.1-py2.7-macosx-10.12-intel.egg/imdb/parser/sql/alchemyadapter.py",
line 54, in <module>
    UNICODECOL: UnicodeText,
NameError: name 'UnicodeText' is not defined

Did I specify 'local_infile' wrong?

Thanks.
Mark

On Sat, Apr 8, 2017 at 5:57 PM, Davide Alberani <davide.alber...@gmail.com>
wrote:

> On Sat, Apr 8, 2017 at 8:10 PM, Zhongjun Jin <mark...@umich.edu> wrote:
> >
> > Could you please give me some hints about what I might have done wrong?
>
> I don't think it's your fault, most probably it's a bug.
>
> It may be related to https://github.com/alberanid/imdbpy/pull/40 (that
> will be merged
> after some tests... give me some days).
>
> Another option, is to use SQLAlchemy instead of SQLObject.
> Try installing it and using it adding "-o sqlalchemy" (no quotes) to
> the command line
> options of imdbpy2sql.py .
>
> HTH,
>
> --
> Davide Alberani <davide.alber...@gmail.com>  [PGP KeyID:
> 0x3845A3D4AC9B61AD]
> http://www.mimante.net/
>



-- 
Zhongjun(Mark) Jin
Computer Science and Engineering Dept
University of Michigan, Ann Arbor
Email: markjin@umich,edu*,* markjin1...@gmail.com
Personal Website: https://markjin1990.github.io/
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to