I'm a former developer but haven't really used Python before. I'm trying to run imdbpy2sql to get the full IMDB into a MySQL database before the ftp files go away.
Python is installed. SQLObject is installed. From the command line, I start from the IMDBPy bin directory and run this line:
E:\IMDB\IMDBPy\imdbpy-5.1\bin>imdbpy2sql.py -d e:\IMDB\IMDB_PT -u mysql://root:a
dmin@localhost/imdb2
...and I get:
File "E:\IMDB\IMDBPy\imdbpy-5.1\bin\imdbpy2sql.py", line 185
except getopt.error, e:
^
SyntaxError: invalid syntax
My plain text files are in e:\IMDB\IMDB_PT. I'm just running a personal MySQL database with user root, password admin.
Looking at the code, line 135 and surrounding looks like this:
133 for opt in optlist:
134 if opt[0] in ('-d', '--data'):
135 IMDB_PTDF_DIR = opt[1]
136 elif opt[0] in ('-u', '--uri'):
137 URI = opt[1]
138 elif opt[0] in ('-c', '--csv'):
139 CSV_DIR = opt[1]
140 elif opt[0] == '--csv-ext':
141 CSV_EXT = opt[1]
142 elif opt[0] in ('-i', '--imdbids'):
143 IMDBIDS_METHOD = opt[1]
144 elif opt[0] in ('-e', '--execute'):
...and it goes on a bit. But it seems to be saying my parameters are off. I just don't have enough experience running this package to know what I've done wrong.
Any help would be appreciated.