Hi Mohamed,
I don't like the WARNING messages at all, to be honest.
I hope to be able to test it soon, but I fear it could take me some time.

Your code is mostly correct, but there's an important thing to check:
are you sure that the first result of a query for "breaking bad"
contains the key "runtime"?
Usually, only the single episodes contain such key, not the series itself.

If in doubt, always use bb.get('runtime')


Hope this helps,



On Mon, Oct 24, 2016 at 6:33 AM, Mohamed Oun <mohamed...@gmail.com> wrote:

> Hello, so the memory error was solved by restarting the machine. And I
> built the database, however, I'm not sure it's complete, as when trying it
> I get a lot of errors.
> Here's my code:
>
> from imdb import IMDb
>
> ia = IMDb('sql', uri='mysql://root:********@localhost/imdb')
>> s_result = ia.search_movie('breaking bad')
>>
>> # Retrieves default information for the first result (a Movie object).
>> bb = s_result[0]
>> ia.update(bb)
>> # Print some information.
>> print bb['runtime']
>> print bb['rating']
>
> And here's what's thrown at me:
>
>> 2016-10-24 06:30:23,743 WARNING [imdbpy.parser.sql.aux]
>> C:\Python27\lib\site-packages\imdb\parser\sql\__init__.py:458: Unable to
>> fetch information for movieID 3768839: The object Title by the ID 3768839
>> does not exist
>> 2016-10-24 06:30:23,744 WARNING [imdbpy.parser.sql.aux]
>> C:\Python27\lib\site-packages\imdb\parser\sql\__init__.py:458: Unable to
>> fetch information for movieID 2823261: The object Title by the ID 2823261
>> does not exist
>> 2016-10-24 06:30:23,744 WARNING [imdbpy.parser.sql.aux]
>> C:\Python27\lib\site-packages\imdb\parser\sql\__init__.py:458: Unable to
>> fetch information for movieID 2739602: The object Title by the ID 2739602
>> does not exist
>> 2016-10-24 06:30:23,744 WARNING [imdbpy.parser.sql.aux]
>> C:\Python27\lib\site-packages\imdb\parser\sql\__init__.py:458: Unable to
>> fetch information for movieID 3558248: The object Title by the ID 3558248
>> does not exist
>> 2016-10-24 06:30:23,744 WARNING [imdbpy.parser.sql.aux]
>> C:\Python27\lib\site-packages\imdb\parser\sql\__init__.py:458: Unable to
>> fetch information for movieID 2819137: The object Title by the ID 2819137
>> does not exist
>> 2016-10-24 06:30:23,746 WARNING [imdbpy.parser.sql.aux]
>> C:\Python27\lib\site-packages\imdb\parser\sql\__init__.py:458: Unable to
>> fetch information for movieID 2810071: The object Title by the ID 2810071
>> does not exist
>> 2016-10-24 06:30:23,746 WARNING [imdbpy.parser.sql.aux]
>> C:\Python27\lib\site-packages\imdb\parser\sql\__init__.py:458: Unable to
>> fetch information for movieID 0: The object Title by the ID 0 does not exist
>> Traceback (most recent call last):
>>   File "E:/Dropbox/Learning/untitled/untitled.py", line 14, in <module>
>>     print bb['runtime']
>>   File "C:\Python27\lib\site-packages\imdb\utils.py", line 1469, in
>> __getitem__
>>     rawData = self.data[key]
>> KeyError: 'runtimes'
>
> Does this mean a problem in the module, or in the database, or my code?
> --
> *Best Regards, *
> *Mohamed Oun*
>
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Imdbpy-help mailing list
> Imdbpy-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/imdbpy-help
>
>


-- 
Davide Alberani <davide.alber...@gmail.com>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to