ameerkat / imdb-to-sql Goto Github PK
View Code? Open in Web Editor NEWConverts the plain text IMDB files available for download into a usable relational database format
License: Apache License 2.0
Converts the plain text IMDB files available for download into a usable relational database format
License: Apache License 2.0
Hello,
I am getting following error while running 'tosql.py' script. Can somebody help me in this regards as I get stuck in this issue. Please also note that I don't have any experience of working on python.
INSERT INTO actors (lname, fname, idactors) VALUES ('""Steff""', 'Stefanie Oxmann Mcgaha', 1)
line: "Steff", Stefanie Oxmann Mcgaha Night of the Demons (2009) (uncredited) [Goth raver]
INSERT INTO movies (idmovies, year, type, title) VALUES (1, 2009, 3, 'Night of the Demons')
Traceback (most recent call last):
File "tosql.py", line 552, in
"number": number, "type": special_code})
File "tosql.py", line 292, in select_or_insert
pdb.pm()
File "/usr/lib64/python2.7/pdb.py", line 1270, in pm
post_mortem(sys.last_traceback)
AttributeError: 'module' object has no attribute 'last_traceback'
I think its a really interesting project and was considering using it (maybe making a small REST interface for it). Have you considered licensing it as a free software project?
I get the following error:
__main__ [status]: using python regex parsing code.
tosql.py:287: Warning: Field 'gender' doesn't have a default value
connection_cursor.execute(build_insert_query(name, param_dict))
Traceback (most recent call last):
File "tosql.py", line 550, in <module>
billing_position}, skip_lookup = True, supress_output = True)
File "tosql.py", line 287, in select_or_insert
connection_cursor.execute(build_insert_query(name, param_dict))
File "build/bdist.macosx-10.12-intel/egg/MySQLdb/cursors.py", line 205, in execute
File "build/bdist.macosx-10.12-intel/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character) VALUES (1, 1, 'Goth raver')' at line 1")
Any clue what I can do to fix it?
First of all thank you very much for your imdb-to-sql code.
I am trying to use it in order to prepare some practices for teaching mysql in my lectures. I have been able to built the database according to the proposed db-schema, however I have seen that the movies are not always correctly parsed. Specifically the regular expression for a movie doesn't work properly.
Just to put an example for the line in the movies.list
"El informal" (1998) {(1998-07-13)} 1998
the output for the code block in the part processing movies:
m = re.match(ParseRegexes.movies, line)
#DEBUG
print "groups: ", m.groups()
gives this result:
groups: ('El informal', '1998', '1998', None, None, None, None, None, None, None, None)
when it should be something similar to:
groups: ('El informal', '1998', '1998', None, None, None, None, 1998-07-13, None, None, None)
it is why the movie is not inserted into the series table as it shoudl be.
I have been trying to fix the movies = re.compile but it is really complex to me figure out how to do it correctly. I wonder if you could revise the "movies = re.compile(...)" in order to make it properly working.
Thank you very much.
Manuel Barrena.
tosql.py:162: Warning: Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
c.execute(query.strip())
main [status]: using python regex parsing code.
tosql.py:287: Warning: Field 'gender' doesn't have a default value
connection_cursor.execute(build_insert_query(name, param_dict))
Traceback (most recent call last):
File "tosql.py", line 550, in
billing_position}, skip_lookup = True, supress_output = True)
File "tosql.py", line 287, in select_or_insert
connection_cursor.execute(build_insert_query(name, param_dict))
File "/Users/manoj/programming/python/Watchseries-Downloader/venv/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/Users/manoj/programming/python/Watchseries-Downloader/venv/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character) VALUES (1, 1, 'Goth raver')' at line 1")
Hello, does this script save the ratings' distribution for each title? (found in the ratings.list file). I need that column to calculate the number of votes for each rating (votes breakdown).
Thank you!
when i run the latest list files, against postgres, i get the error:
Traceback (most recent call last):
File "tosql.py", line 550, in <module>
billing_position}, skip_lookup = True, supress_output = True)
File "tosql.py", line 287, in select_or_insert
connection_cursor.execute(build_insert_query(name, param_dict))
psycopg2.DataError: value too long for type character varying(1023)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.