Re: [Imdbpy-help] timing out
On Thu, Mar 22, 2012 at 09:29, Tomáš Hnyk tomash...@gmail.com wrote: Thanks a lot, that will be great:-). Ok, in the mercurial repository you can set the 'reraiseExceptions' argument (of the IMDb() instance or in the imdbpy.cfg file, if you use it) to True, to re-raise every caught exception. By default, it's false. Thanks for the idea, I've added your name to the credits. -- Davide Alberani davide.alber...@gmail.com [PGP KeyID: 0x465BFD47] http://www.mimante.net/ -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
Re: [Imdbpy-help] timing out
On Sat, Mar 24, 2012 at 11:51, Tomáš Hnyk tomash...@gmail.com wrote: and it has been hanging at this for about two minutes now and counting. Should not it raise some sort of exception, or is it going to wait for something indefinitely? :-/ It's very possible that it will wait until the end of time, I fear. I was originally asking if there were a way to set a timeout to retrieving film info. Is there some internal timeout in imdbpy after which it justs gives up? My fault: I misunderstood the problem. No, IMDbPY uses urllib, and it doesn't provide a way to set a timeout. urllib2 has it, but only in very recent python versions, so I'd prefer not to use it (and, by the way, a conversion from urllib to urllib2 would take me some time). I found a way to do this on in internet: import signal Yes, it's more or less reasonable, but I want to think twice about it, before I introduce an alarm in the IMDbPY code... after all i's a library and it could heavily interfere with signal handling made by the programs that uses it. :-( Real point is, it's very strange that it happens so methodically on your system... I think I've never seen it hangs during a request. Anyway, if you can try to put _before_ IMDb is imported/instanced this: import socket socket.setdefaulttimeout(10) With that, at least the 'open' should fail after at most 10 seconds. If this doesn't work for you, it means that the connection is established, but hangs (or is really slow) reading the data. If it's so, I fear an alarm-based solution is the only way... :-/ Thanks for the debugging! -- Davide Alberani davide.alber...@gmail.com [PGP KeyID: 0x465BFD47] http://www.mimante.net/ -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
[Imdbpy-help] Episode information of not available
Hi there, I was looking if I could retreive episode information through imdbpy, but was unable to do so: I executed following code which can be found here: http://imdbpy.sourceforge.net/docs/README.series.txt from imdb import IMDb i = IMDb() m = i.get_movie('0389564') # The 4400. m['kind']# kind is 'tv series'. i.update(m, 'episodes') # retrieves episodes information. Whenever I call: m['episodes'] I get following error message: ...\imdb\utils.pyc in __getitem__(self, key) 1431 # Handle key aliases. 1432 key = self.keys_alias.get(key, key) - 1433 rawData = self.data[key] 1434 if key in self.keys_tomodify and \ 1435 self.modFunct not in (None, modNull): KeyError: 'episodes' I'm I doing something wrong? I currently using IMDbPY 4.8.2 2011-11-01 with Python 2.7.2 32 Bit. It would be very nice if someone could help me here or at least see if you also get the error. Greetings, David -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
Re: [Imdbpy-help] Episode information of not available
On Sat, Mar 24, 2012 at 14:44, David Kaufman david.kauf...@gmx.de wrote: I was looking if I could retreive episode information through imdbpy, but was unable to do so: Recently the episode pages changed a lot. A fix is already available on the Mercurial repository: https://bitbucket.org/alberanid/imdbpy/ Let me know if you encounter other problems! -- Davide Alberani davide.alber...@gmail.com [PGP KeyID: 0x465BFD47] http://www.mimante.net/ -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help