Re: [Freevo-users] IMDB lookup
On 26/04/2010 09:07, Paul Harper wrote: Hi, After a couple of solid weekends I have just about everything working how I want it, but the IMDB plugin that I just can't work out. I'm using Freevo 1.9.0 on Ubuntu Karmic Koala, I have patched the IMDB plugin and am using html5lib as described elsewhere on these pages. This allowed me to progress to the point of being able to choose from a list of films to parse information from. After selecting the correct film and getting a message along the lines of 'retrieving information' Freevo crashes with this message: event 'MENU_SELECT' crashed In the terminal it says: Traceback (most recent call last): File /usr/lib/python2.6/dist-packages/freevo/main.py, line 306, in eventhandler app.eventhandler(event) File /usr/share/pyshared/freevo/menu.py, line 842, in eventhandler self._handle_play_item(menu, event) File /usr/share/pyshared/freevo/menu.py, line 654, in _handle_play_item action(arg=arg, menuw=self) File /usr/share/pyshared/freevo/menu.py, line 106, in select self.function(arg=self.arg, menuw=menuw) File /usr/share/pyshared/freevo/video/plugins/imdb.py, line 227, in imdb_create_fxd fxd.getIMDBid(arg[0], self.season, self.episode) File /usr/share/pyshared/freevo/util/fxdimdb.py, line 308, in getIMDBid self.parse_data(idpage, id, episodeid, season, episode) File /usr/share/pyshared/freevo/util/fxdimdb.py, line 431, in parse_data soup.feed(r.read()) TypeError: 'NoneType' object is not callable and from the log file: 2010-04-26 03:42:06,750 DEBUGfxdimdb.py (273): id=0930083 season= episode= 2010-04-26 03:42:06,750 DEBUGfxdimdb.py (279): url=u'http://www.imdb.com/title/tt0930083/episodes' 2010-04-26 03:42:07,945 DEBUGfxdimdb.py (879): id=u'0930083' 2010-04-26 03:42:07,946 DEBUGfxdimdb.py (292): url=u'http://www.imdb.com/title/tt0930083' 2010-04-26 03:42:10,930 DEBUGfxdimdb.py (412): items=rating:7.6/10 (778 votes) 2010-04-26 03:42:10,930 DEBUGfxdimdb.py (412): items=language:Japanese 2010-04-26 03:42:10,931 DEBUGfxdimdb.py (412): items=plot:A documentary filmmaker explores seemingly unrelated paranormal incidents connected by the legend of an ancient demon called the kagutaba. | 2010-04-26 03:42:10,931 DEBUGfxdimdb.py (412): items=tagline:Everybody died. 2010-04-26 03:42:10,934 DEBUGfxdimdb.py (412): items=release_date:20 August 2005 (Japan) 2010-04-26 03:42:10,934 DEBUGfxdimdb.py (412): items=title:Noroi 2010-04-26 03:42:10,935 DEBUGfxdimdb.py (412): items=plot_keywords:Demon / Fake Documentary / 2000s / Dam / Pigeon 2010-04-26 03:42:10,935 DEBUGfxdimdb.py (412): items=country:Japan 2010-04-26 03:42:10,936 DEBUGfxdimdb.py (412): items=aspect_ratio:1.85 : 1 2010-04-26 03:42:10,936 DEBUGfxdimdb.py (412): items=also_known_as:Noroi the Curse - Hong Kong 2010-04-26 03:42:10,937 DEBUGfxdimdb.py (412): items=year:2005 2010-04-26 03:42:10,937 DEBUGfxdimdb.py (412): items=genre:Horror 2010-04-26 03:42:10,937 DEBUGfxdimdb.py (412): items=runtime:Japan:115 min 2010-04-26 03:42:10,938 DEBUGfxdimdb.py (413): id=0930083, dvd=0 2010-04-26 03:42:10,938 DEBUGfxdimdb.py (414): {'rating': u'7.6/10 (778 votes)', u'language': u'Japanese', 'plot': u'A documentary filmmaker explores seemingly unrelated paranormal incidents connected by the legend of an ancient demon called the kagutaba. |', 'tagline': u'Everybody died.', u'release_date': u'20 August 2005 (Japan)', 'title': u'Noroi', u'plot_keywords': u'Demon / Fake Documentary / 2000s / Dam / Pigeon', u'country': u'Japan', u'aspect_ratio': u'1.85 : 1', u'also_known_as': u'Noroi the Curse - Hong Kong', 'year': u'2005', 'genre': u'Horror', 'runtime': u'Japan:115 min'} 2010-04-26 03:42:14,393 DEBUGfxdimdb.py (426): url=http://us.imdb.com/title/tt0930083/dvd; Traceback (most recent call last): File /usr/lib/python2.6/dist-packages/freevo/main.py, line 306, in eventhandler app.eventhandler(event) File /usr/share/pyshared/freevo/menu.py, line 842, in eventhandler self._handle_play_item(menu, event) File /usr/share/pyshared/freevo/menu.py, line 654, in _handle_play_item action(arg=arg, menuw=self) File /usr/share/pyshared/freevo/menu.py, line 106, in select self.function(arg=self.arg, menuw=menuw) File /usr/share/pyshared/freevo/video/plugins/imdb.py, line 227, in imdb_create_fxd fxd.getIMDBid(arg[0], self.season, self.episode) File /usr/share/pyshared/freevo/util/fxdimdb.py, line 308, in getIMDBid self.parse_data(idpage, id, episodeid, season, episode) File /usr/share/pyshared/freevo/util/fxdimdb.py, line 431, in parse_data soup.feed(r.read()) TypeError: 'NoneType' object is not callable Can anyone help? I'm sorry if this is obvious, I've spent a lot of time working other problems out as I'm new to freevo and linux and I want to
Re: [Freevo-users] IMDB lookup
On Mon, 26 Apr 2010, Paul Harper wrote: Can anyone help? I'm sorry if this is obvious, I've spent a lot of time working other problems out as I'm new to freevo and linux and I want to advance my understanding at least a little, but this one has me stuck. Cheers. Is this IMDB for viewing your DVDs or for TV ? as you have an au email address if you use shepherd for tv guide data it will deal with IMDB if it is for your DVDs, just ignore this -- ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] imdb lookup not returning movie description
IMDB did a quite big redesign of the movie pages. fixing some regexps should suffice to solve this issue. On Tue, 2007-02-20 at 11:41 +, Patrick Carey wrote: Hi, this only started happening this morning but every time i try to lookup data from imdb, it finds the film ok and downloads all of the info except the plot description. I haven't changed anything since yesterday when it was working fine so I'm at a loss here. Maybe IMDB has changed it's formats slightly? Is this happening to anyone else? I'm using ubuntu edgy with the packages from ubuntu.geole.info. Thanks, Paddy - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
harri wrote: On Tuesday 19 December 2006 01:05, Duncan Webb wrote: You sound that you know Python's Unicode handling pretty well, would you be able to take a look at the library.rpy code, it breaks all over the place because the file names are being passed around as unicode strings. If I roll my sleeves and do an unicode audit, would a patch against rev 8742 be easy to handle, or should I use another revision? That will be great, you can use this revision or r8743, which includes two extra key mappings '[' PREV and ']' NEXT for the detached player. 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
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'#34;Telefonen ringer!#34;', 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. 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
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'#34;Telefonen ringer!#34;', 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
Is there not a better way to fix it, or do we just need to wait on the BeautifulSoap Guys? Duncan Webb wrote: 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'#34;Telefonen ringer!#34;', 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
Also I am still getting 'unknown error while connecting to IMDB' on a bunch of other movies. Al that gets logged for them is: http://us.imdb.com/title/tt0457510/?fr=c2l0ZT1kZnx0dD0xfGZiPXV8cG49MHxxPW5hY2hvIGxpYnJlIHxteD0yMHxsbT01MDB8aHRtbD0x;fc=1;ft=20 - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
I just noticed that the files that return that error or files that do not return multiple pages from IMDB, but instead go directly to an exact match. Also sorry for 'spamming' with so many separate messages. - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
Freevo 1.x SVN? Because that is what I am running. Duncan Webb wrote: Ryan Roth wrote: Also I am still getting 'unknown error while connecting to IMDB' on a bunch of other movies. Al that gets logged for them is: http://us.imdb.com/title/tt0457510/?fr=c2l0ZT1kZnx0dD0xfGZiPXV8cG49MHxxPW5hY2hvIGxpYnJlIHxteD0yMHxsbT01MDB8aHRtbD0x;fc=1;ft=20 That's an error in BeautifulSoup that I have worked around in svn, AFAIK BeautifulSoup should process the entities eg. #244; as it returns a unicode string and says that the encoding is utf-8. The entities are latin-1 encoded. Anyway the workaround is in svn. 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
Create a file called 'Nacho Libre (2006).avi' and try a IMDB lookup on it. - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
On Monday 18 December 2006 18:16, Duncan Webb wrote: 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() Actually I think Python's unicode handling is fairly good, but it is not automatic. It would be easiest for maintenance if everything internally would be kept in utf-8, but I realize the modular plugin architecture of freevo might make it difficult. I suggest that site.py be bypassed all-together. This could be done by changing freevo startup line from #!/usr/bin/python to #!/usr/bin/python -S And changing the default encoding by adding import sys sys.setdefaultencoding(iso-8859-15) or perhaps sys.setdefaultencoding(utf-8) because as soon as freevo starts getting Asian users the latin-1 type encodings don't cut it any more. This way it will be specific to Freevo, and not system wide. Btw. difference between iso-8859-1 and iso-8859-15 is that the latter does support the new Euro character: €. For filenames, perhaps os.path.supports_unicode_filenames should be examined. From the doc: True if arbitrary Unicode strings can be used as file names (within limitations imposed by the file system), and if os.listdir() returns Unicode strings for a Unicode argument. New in version 2.3. Some ideas if anyone has time to try. -Harri - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
The current SVN version solved the issue. While we're on the subject of IMDB lookups, after completing and update the listing does not auto update to show the changes like it use to. Instead you have to back one menu and then re-enter to see the results of the IMDB lookup. I am assuming this is just a matter of calling a menuw refresh. harri wrote: On Monday 18 December 2006 18:16, Duncan Webb wrote: 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() Actually I think Python's unicode handling is fairly good, but it is not automatic. It would be easiest for maintenance if everything internally would be kept in utf-8, but I realize the modular plugin architecture of freevo might make it difficult. I suggest that site.py be bypassed all-together. This could be done by changing freevo startup line from #!/usr/bin/python to #!/usr/bin/python -S And changing the default encoding by adding import sys sys.setdefaultencoding(iso-8859-15) or perhaps sys.setdefaultencoding(utf-8) because as soon as freevo starts getting Asian users the latin-1 type encodings don't cut it any more. This way it will be specific to Freevo, and not system wide. Btw. difference between iso-8859-1 and iso-8859-15 is that the latter does support the new Euro character: €. For filenames, perhaps os.path.supports_unicode_filenames should be examined. From the doc: True if arbitrary Unicode strings can be used as file names (within limitations imposed by the file system), and if os.listdir() returns Unicode strings for a Unicode argument. New in version 2.3. Some ideas if anyone has time to try. -Harri - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
Ryan Roth wrote: The current SVN version solved the issue. While we're on the subject of IMDB lookups, after completing and update the listing does not auto update to show the changes like it use to. Instead you have to back one menu and then re-enter to see the results of the IMDB lookup. I am assuming this is just a matter of calling a menuw refresh. The very latest, the direct imdb hit, is fixed and so the htmlenties2txt problem. It now processes: 0109422 from the results. eg: http://www.imdb.com/find?s=tt;site=aka;q=one%20flew%20over%20cuckoos%20nest%20 [ ('0073486', uOne Flew Over the Cuckoo's Nest, u'1975', ''), ('0121735', u'Sha da jie fan zhuan feng ren yuan', u'1993', ''), ('0109422', u'Ranma #189;: Ch#244;-musabetsu kessen! Ranma team VS densetsu no h#244;#244;', u'1994', ''), ('0030223', u'Healthy, Wealthy and Dumb', u'1938', '') ] harri wrote: You sound that you know Python's Unicode handling pretty well, would you be able to take a look at the library.rpy code, it breaks all over the place because the file names are being passed around as unicode strings. I just don't know enough about HTTP and how to encode file names so that they don't get converted. What I find a problem with python's unicode handling is when a decode fails it reports an UnicodeEncodingError and visa versa. decode/encode are not really intuitive as you have to know from which perspective the decode/encode works. What I mean is string.decode() returns a unicodestr and unicodestr.encode() return a string, you have to know that it is from the string. unicode('ü') crashes with the default ascii encoding. On Monday 18 December 2006 18:16, Duncan Webb wrote: 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() Actually I think Python's unicode handling is fairly good, but it is not automatic. It would be easiest for maintenance if everything internally would be kept in utf-8, but I realize the modular plugin architecture of freevo might make it difficult. I suggest that site.py be bypassed all-together. This could be done by changing freevo startup line from #!/usr/bin/python to #!/usr/bin/python -S And changing the default encoding by adding import sys sys.setdefaultencoding(iso-8859-15) or perhaps sys.setdefaultencoding(utf-8) because as soon as freevo starts getting Asian users the latin-1 type encodings don't cut it any more. Sound like a good idea, I'll try it out. :) This way it will be specific to Freevo, and not system wide. Btw. difference between iso-8859-1 and iso-8859-15 is that the latter does support the new Euro character: €. For filenames, perhaps os.path.supports_unicode_filenames should be examined. From the doc: True if arbitrary Unicode strings can be used as file names (within limitations imposed by the file system), and if os.listdir() returns Unicode strings for a Unicode argument. New in version 2.3. I noticed that the same file name from a fat (usb drive) and an ext3 partition were differently encoded. But I didn't try os.path.supports_unicode_filenames. Some ideas if anyone has time to try. -Harri - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
On Tuesday 19 December 2006 01:05, Duncan Webb wrote: You sound that you know Python's Unicode handling pretty well, would you be able to take a look at the library.rpy code, it breaks all over the place because the file names are being passed around as unicode strings. If I roll my sleeves and do an unicode audit, would a patch against rev 8742 be easy to handle, or should I use another revision? -Harri - 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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] IMDB lookup crashes
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.phpp=sourceforgeCID=DEVDEV ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users