imdbpy2sql必须为数据库连接提供URI

时间:2012-11-18 04:14:58

标签: python database sqlite

我提供以下命令,请告诉我哪里出错了。

**$ imdbpy2sql.py -d /home/santoshvm/Documents/IMDB DataBase/DataFiles -u URI sqlite:////home/santoshvm/Documents/IMDB DataBase/SQLite Database File/IMDB.sqlite --sqlite-transactions**
2012-11-17 20:11:34,585 WARNING [imdbpy.parser.sql.aux] /usr/local/lib/python2.7/dist-packages/IMDbPY-4.9-py2.7.egg/imdb/parser/sql/__init__.py:125: Unable to import the cutils.ratcliff function.  Searching names and titles using the "sql" data access system will be slower.
2012-11-17 20:11:34,586 WARNING [imdbpy.parser.sql.aux] /usr/local/lib/python2.7/dist-packages/IMDbPY-4.9-py2.7.egg/imdb/parser/sql/__init__.py:332: Unable to import the cutils.soundex function.  Searches of movie titles and person names will be a bit slower.
You must supply the URI for the database connection
imdbpy2sql.py usage:
    /usr/local/bin/imdbpy2sql.py -d /directory/with/PlainTextDataFiles/ -u URI [-c /directory/for/CSV_files] [-o sqlobject,sqlalchemy] [-i table,dbm] [--CSV-OPTIONS] [--COMPATIBILITY-OPTIONS]

提供URI的正确方法是什么?

1 个答案:

答案 0 :(得分:1)

问题是你的路径中有空格:

home/santoshvm/Documents/IMDB DataBase/SQLite Database File/IMDB.sqlite

您应该重命名目录或使用“\”转义空格:

home/santoshvm/Documents/IMDB\ DataBase/SQLite\ Database\ File/IMDB.sqlite