我尝试使用来自 IMDbPY 的 SQLobject,Python 说驱动程序不起作用——我正在运行 PostgreSQL 9.2。
C:\Users\dom\AppData\Roaming\Python\Scripts>python imdbpy2sql.py -d /imdb -u 'postgres://sid:asdf@host/imdb'
Traceback (most recent call last):
File "imdbpy2sql.py", line 501, in <module>
conn = setConnection(URI, DB_TABLES)
File "C:\Users\dom\AppData\Roaming\Python\Python27\site-packages\imdb\parser\sql\objectadapter.py", line 185, in setConnection
conn = connectionForURI(uri, **kw)
File "C:\Users\dom\AppData\Roaming\Python\Python27\site-packages\sqlobject\dbconnection.py", line 1004, in connectionForURI
connCls = self.dbConnectionForScheme(scheme)
File "C:\Users\dom\AppData\Roaming\Python\Python27\site-packages\sqlobject\dbconnection.py", line 1021, in dbConnectionForScheme
% (scheme, ', '.join(self.schemeBuilders.keys())))
AssertionError: No SQLObject driver exists for 'postgres (only sqlite, sapdb, postgresql, firebird, maxdb, rdbhost, sybase, interbase, psycopg, mysql, mssql, postgres)
我尝试再次安装它,activepython说它已经安装了:-</p>
C:\Users\dom\AppData\Roaming\Python\Scripts>pypm install sqlobject
skipping "sqlobject"; already installed at "%APPDATA%\Python" (2.7)
关于使 imdbpy2sql.py/SQLobject 工作的任何想法?