0

I tried using SQLobject from IMDbPY and Python said the driver didn't work- I'm running 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)

I tried installing it again and activepython says it's already installed: –

C:\Users\dom\AppData\Roaming\Python\Scripts>pypm install sqlobject skipping "sqlobject"; already installed at "%APPDATA%\Python" (2.7)

Any ideas on making imdbpy2sql.py/SQLobject work?

cathulhu
  • 641
  • 1
  • 9
  • 20
trianIMDB
  • 1
  • 2

2 Answers2

0

Use the DB URI without quotes (!).

ug-
  • 1
0

Late, but from the imdb2py docs:

[OTHER REQUIRED MODULES] Obviously SQLObject and SQLAlchemy can access databases only through other specific modules/packages, that you need to have installed (e.g.: 'mysql-python' for MySQL, 'psycopg' for PostgreSQL, and so on).

Did you try installing those?

Adib Saad
  • 552
  • 3
  • 10