Ryan Roth wrote:
> A lot of times i immediately get 'Unknown error connecting to IMDB', 
> other times I get a 'even MENU-SELECT crashed' here is the error trace 
> for one:
> 
> http://us.imdb.com/find?q=ringer%20;s=tt
> [('0267891', u'The Ringer', u'2005', ''), ('0117480', u'Ringer', 
> u'1996', ''), ('0455857', u'When a Stranger Calls', u'2006', ''), 
> ('0057997', u'Dead Ringer', u'1964', ''), ('0058191', u'Hexer, Der', 
> u'1964', ''), ('0078765', u'The American Success Company', u'1980', ''), 
> ('0101673', u'Dead Ringer', u'1981', ''), ('0123678', u'Chock 6 - Det 
> ringer', u'1997', u'TV'), ('0045092', u'The Ringer', u'1952', ''), 
> ('0109918', u'Golubinyj zvonar', u'1994', ''), ('0495150', u'Marcco, der 
> Ringer des Mikado', u'1922', ''), ('0127041', u'Naar juleklokkerne 
> ringer', u'1917', ''), ('0851435', u'The Old Bell-Ringer', u'1914', ''), 
> ('0772974', u'A Ringer for Max', u'1915', ''), ('0019326', u'The 
> Ringer', u'1928', ''), ('0023404', u'The Ringer', u'1931', ''), 
> ('0261955', u'The Ringer', u'1938', u'TV'), ('0201458', u'Beatrice 
> Fairfax Episode 13: The Ringer', u'1916', ''), ('0297775', u'Bell Ringer 
> of Antigua', u'1946', ''), ('0152208', u'Robot Ringer', u'1962', ''), 
> ('0324189', u'Telefonen ringer', u'1960', ''), ('0341966', 
> u'"Telefonen ringer!"', u'1964', ''), ('0141065', u'Felix the 
> Cat Rings the Ringer', u'1926', '')]
> type=2 key=13
> rating : 5.8/10 (4,788 votes)
> plot : A young guy's only option to erase a really bad debt is to rig 
> the Special Olympics by posing as a contestant.
> tagline : Only a jackass would fix the Special Olympics
> image : http://ia.ec.imdb.com/media/imdb/01/I/97/66/49m.jpg
> title : The Ringer
> year : 2005
> genre : Comedy / Sport
> runtime : 94 min  / Argentina:95 min
> id: 0267891 dvd: 0
> url: http://us.imdb.com/title/tt0267891/dvd
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/freevo/main.py", line 285, in 
> eventhandler
>     app.eventhandler(event)
>   File "/usr/lib/python2.4/site-packages/freevo/menu.py", line 621, in 
> eventhandler
>     action( arg=arg, menuw=self )
>   File "/usr/lib/python2.4/site-packages/freevo/menu.py", line 92, in select
>     self.function(arg=self.arg, menuw=menuw)
>   File "/usr/lib/python2.4/site-packages/freevo/video/plugins/imdb.py", 
> line 204, in imdb_create_fxd
>     fxd.setImdbId(arg[0])
>   File "/usr/lib/python2.4/site-packages/freevo/util/fxdimdb.py", line 
> 177, in setImdbId
>     self.parsedata(idpage, id)
>   File "/usr/lib/python2.4/site-packages/freevo/util/fxdimdb.py", line 
> 623, in parsedata
>     soup.feed(r.read())
>   File "/usr/lib/python2.4/sgmllib.py", line 95, in feed
>     self.goahead(0)
>   File "/usr/lib/python2.4/sgmllib.py", line 134, in goahead
>     k = self.parse_endtag(i)
>   File "/usr/lib/python2.4/sgmllib.py", line 296, in parse_endtag
>     self.finish_endtag(tag)
>   File "/usr/lib/python2.4/sgmllib.py", line 336, in finish_endtag
>     self.unknown_endtag(tag)
>   File "/usr/lib/python2.4/site-packages/BeautifulSoup.py", line 1184, 
> in unknown_endtag
>     self.endData()
>   File "/usr/lib/python2.4/site-packages/BeautifulSoup.py", line 1070, 
> in endData
>     o = containerClass(currentData)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 
> 156: ordinal not in range(128)
> 
> Currently I have to use my old box to lookup IMDB info.  Thanks.

It does look like a bug in BeautifulSoup. :(

Having grabbed the page with wget, edited it with vim, it does have <92>
bytes in there.

The real problem is Python and it's unicode handling, it's not very good
but the fix is simple. :)

Change line 352 in /usr/lib/python2.4/site.py from:
    encoding = "ascii" # Default value set by _PyUnicode_Init()
to:
    encoding = "iso-8859-1" # Default value set by _PyUnicode_Init()

Duncan

> 
> 
> 
> Duncan Webb wrote:
>> Ryan Roth wrote:
>>   
>>>     I am currently running the SVN 1.X version of Freevo, which uses 
>>> BeautifulSoap.py to process XML.  90% of IMDB lookups crash, dumping an 
>>> error caused by BeautifulSoap.  Should Freevo be using BeautifulSoap if 
>>> it so unreliable?  I am running version 3.0.3 of BeautifulSoap, should I 
>>> be using a different version?
>>>     
>> Will you post the error trace?
>>
>> I've tried it one a few movies, and no crash so far.
>>
>> Duncan
>>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to