Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6706019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:28:15+00:00 2026-05-26T07:28:15+00:00

I am having a problem while trying to import imdb data from text files

  • 0

I am having a problem while trying to import imdb data from text files to MySQL database using imdbpy2sql.py script.

It throws the following error. It seems like the exception handler code tries to insert a duplicated record into cast_info table with existing primary key.

Can anyone help me fix this problem or suggest any work around solution?

SCANNING actor: Hall, Stephan
SCANNING actor: Halsey, William F.
 * FLUSHING CharactersCache...
 * TOO MANY DATA (100000 items in CharactersCache), recursion: 1
   * SPLITTING (run 1 of 2), recursion: 1
 * FLUSHING CharactersCache...
Traceback (most recent call last):
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 2951, in <module>
    run()
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 2812, in run
    castLists(_charIDsList=characters_imdbIDs)
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 1576, in castLists
    doCast(f, roleid, rolename)
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 1535, in doCast
    cid = CACHE_CID.addUnique(role)
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 957, in addUnique
    else: return self.add(key, miscData)
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 950, in add
    self[key] = c
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 860, in __setitem__
    self.flush()
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 912, in flush
    self.flush(quiet=quiet, _recursionLevel=_recursionLevel)
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 883, in flush
    self._toDB(quiet)
  File "D:\project\IMDB\IMDbPY-4.7\bin\imdbpy2sql.py", line 1186, in _toDB
    CURS.executemany(self.sqlstr, self.converter(l))
  File "C:\Python27\lib\site-packages\MySQLdb\cursors.py", line 206, in executemany
    r = r + self.execute(query, a)
  File "C:\Python27\lib\site-packages\MySQLdb\cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry '745684' for key 'PRIMARY'")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:28:16+00:00Added an answer on May 26, 2026 at 7:28 am

    A lot of similar problems were fixed in the development version.
    Please try again with the version in the Mercurial repository:
    https://bitbucket.org/alberanid/imdbpy/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem while trying to call a custom Model method from my
I'm having problem from a while (since I'm using visual studio 2010 I think).
I am having this problem An error occurred while trying to make a request
I’m having some difficulties while trying to consume an unmanaged-code dll from my application
I'm having a problem while trying to dynamically change a table cell's styling class
I'm having a weird problem on deployment while trying to use Microsoft Enterprise Library's
I'm having a bit of an odd problem while trying to compile some code
I'm having problem (basically, I'm confused.) while trying to create a worker thread for
I have a flash file menu i am having problem while link it to
Hey dudes.i am having this problem while symlinking. I have successfully deployed a ruby

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.