Giter Club home page Giter Club logo

imdb-to-sql's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imdb-to-sql's Issues

Error while running the script

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'

License?

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?

Error SQL syntax

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?

Parsing correctly the movies

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.

while connecting to mysql

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")

Ratings distrbution

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!

billing_position, skip_lookup error

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.