lukeskywalkerwasright / bluecop-xbmc-repo

Automatically exported from code.google.com/p/bluecop-xbmc-repo
0 stars 0 forks source link

Plug-in error when listing CBS shows #82

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open CBS->Daytime->The Young and the Restless->Full Episodes
2. Error script failed displays. Episodes are not listed. Note that the dialog 
does show that 11 items were located before the error occurs. 

What is the expected output? What do you see instead?
The list of the Y&R episodes should be displayed

What version of the product are you using? On what operating system?
Free Cable 0.2.1 on Apple TV (1st gen).

Please provide any additional information below.
Two additional notes:
1. I am using a proxy. I confirmed that the proxy is good with Firefox.
2. Here is a portion of the xbmc.log file showing the errors with the operation:

 start of FREE CABLE plugin
00:37:06 T:53626368 M:  3457024  NOTICE: FREE CABLE --> common :: getHTML :: 
url = 
http://www.cbs.com/carousels/617/video/0_video_small/b6de8288d336e9b7f22b2f69d15
c9f9a/0/400/
00:37:07 T:53626368 M:  3325952   ERROR: Error Type: exceptions.TypeError
00:37:07 T:53626368 M:  3325952   ERROR: Error Contents: argument 1 must be 
unicode or str
00:37:07 T:53626368 M:  3330048   ERROR: Traceback (most recent call last):
                                              File "/Users/frontrow/Library/Application Support/XBMC/addons/plugin.video.free.cable/default.py", line 49, in ?
                                                modes ( )
                                              File "/Users/frontrow/Library/Application Support/XBMC/addons/plugin.video.free.cable/default.py", line 45, in modes
                                                exec 'sitemodule.%s()' % common.args.sitemode
                                              File "<string>", line 1, in ?
                                              File "/Users/frontrow/Library/Application Support/XBMC/addons/plugin.video.free.cable/resources/lib/cbs.py", line 216, in newvideos
                                                for video in itemList:
                                            TypeError: argument 1 must be unicode or str
00:37:07 T:2684407808 M:  3117056   ERROR: GetDirectory - Error getting 
plugin://plugin.video.free.cable/?url="http%3A%2F%2Fwww.cbs.com%2Fcarousels%2F61
7%2Fvideo%2F0_video_small%2Fb6de8288d336e9b7f22b2f69d15c9f9a%2F0%2F400%2F"&mode=
"cbs"&sitemode="newvideos"&name="Full+Episodes"
00:37:07 T:2684407808 M:  3117056   ERROR: 
CGUIMediaWindow::GetDirectory(plugin://plugin.video.free.cable/?url="http%3A%2F%
2Fwww.cbs.com%2Fcarousels%2F617%2Fvideo%2F0_video_small%2Fb6de8288d336e9b7f22b2f
69d15c9f9a%2F0%2F400%2F"&mode="cbs"&sitemode="newvideos"&name="Full+Episodes") 
failed
00:37:07 T:2684407808 M:  3112960 WARNING: GetLabel - Unknown nodetype 
requested 6

Original issue reported on code.google.com by lman...@gmail.com on 3 Dec 2011 at 5:39

GoogleCodeExporter commented 8 years ago
I am seeing the same error in cbs.py, the TypeError: argument 1 must be unicode 
or str error. I tried to debug the cbs.py script but could not find the 
problem. The JSON object returned appears to have the correct label/value 
combinations and the correct types, but xbmc is not happy. I can iterate 
through the list returned, but trying to pass the values into addDirectory 
fails, and/or the for list iteration fails (Python does not appear to be very 
good about pointing to the correct line number on errors). 

Original comment by art.r.ta...@gmail.com on 4 Dec 2011 at 4:55

GoogleCodeExporter commented 8 years ago
I am seeing the same issue as well, seems to happen on CBS and USA Network when 
you try to get the episodes for a show:

start of FREE CABLE plugin
22:20:28 T:2818005872 M:1931284480  NOTICE: FREE CABLE --> common :: getHTML :: 
url = http://video.usanetwork.com/
22:20:33 T:3054524288 M:1931317248 WARNING: GetLabel - Unknown nodetype 
requested 6
22:20:42 T:2818005872 M:1932615680  NOTICE: -->Python Interpreter Initialized<--
22:20:44 T:2818005872 M:1931354112  NOTICE: common.args
22:20:44 T:2818005872 M:1931354112  NOTICE: {'url': 
'http://www.usanetwork.com/series/burnnotice/video/fullep/', 'sitemode': 
'episodes', 'name': 'Burn Notice', 'mode': 'usa'}
22:20:44 T:2818005872 M:1931354112  NOTICE: addoncompat.py: XBMC Revision not 
available - Version String: 10.1 Git:Unknown
22:20:44 T:2818005872 M:1931354112  NOTICE:

                                            start of FREE CABLE plugin
22:20:45 T:2818005872 M:1931354112  NOTICE: FREE CABLE --> common :: getHTML :: 
url = http://www.usanetwork.com/series/burnnotice/video/fullep/
22:20:47 T:2818005872 M:1931345920  NOTICE: FREE CABLE --> common :: getHTML :: 
url = 
http://videoservices.nbcuni.com/player/feeds?networkName=usa&results=50&showHier
archy=true&profile=2&level=34985&output=json&callback=__osmf_fullep.getEpisodes
22:20:47 T:2818005872 M:1931345920   ERROR: Error Type: exceptions.TypeError
22:20:47 T:2818005872 M:1931345920   ERROR: Error Contents: argument 1 must be 
unicode or str
22:20:47 T:2818005872 M:1931345920   ERROR: Traceback (most recent call last):
                                              File "/home/oscar/.xbmc/addons/plugin.video.free.cable/default.py", line 49, in ?
                                                modes ( )
                                              File "/home/oscar/.xbmc/addons/plugin.video.free.cable/default.py", line 45, in modes
                                                exec 'sitemodule.%s()' % common.args.sitemode
                                              File "<string>", line 1, in ?
                                              File "/home/oscar/.xbmc/addons/plugin.video.free.cable/resources/lib/usa.py", line 47, in episodes
                                                for video in itemList:
                                            TypeError: argument 1 must be unicode or str
22:20:47 T:3054524288 M:1931345920   ERROR: GetDirectory - Error getting 
plugin://plugin.video.free.cable/?url="http%3A%2F%2Fwww.usanetwork.com%2Fseries%
2Fburnnotice%2Fvideo%2Ffullep%2F"&mode="usa"&sitemode="episodes"&name="Burn+Noti
ce"
22:20:47 T:3054524288 M:1931345920   ERROR: 
CGUIMediaWindow::GetDirectory(plugin://plugin.video.free.cable/?url="http%3A%2F%
2Fwww.usanetwork.com%2Fseries%2Fburnnotice%2Fvideo%2Ffullep%2F"&mode="usa"&sitem
ode="episodes"&name="Burn+Notice") failed
22:20:47 T:3054524288 M:1931345920 WARNING: GetLabel - Unknown nodetype 
requested 6

22:18:34 T:2818005872 M:1937121280  NOTICE: -->Python Interpreter Initialized<--
22:18:36 T:2818005872 M:1935724544  NOTICE: common.args
22:18:36 T:2818005872 M:1935724544  NOTICE: {'url': 
'http://www.cbs.com/carousels/5623/video/0_video_small/b6de8288d336e9b7f22b2f69d
15c9f9a/0/400/', 'sitemode': 'newvideos', 'name': 'Full Episodes', 'mode': 
'cbs'}
22:18:36 T:2818005872 M:1935724544  NOTICE: addoncompat.py: XBMC Revision not 
available - Version String: 10.1 Git:Unknown
22:18:36 T:2818005872 M:1935724544  NOTICE:

                                            start of FREE CABLE plugin
22:18:36 T:2818005872 M:1935724544  NOTICE: FREE CABLE --> common :: getHTML :: 
url = 
http://www.cbs.com/carousels/5623/video/0_video_small/b6de8288d336e9b7f22b2f69d1
5c9f9a/0/400/
22:18:37 T:2818005872 M:1935724544   ERROR: Error Type: exceptions.TypeError
22:18:37 T:2818005872 M:1935724544   ERROR: Error Contents: argument 1 must be 
unicode or str
22:18:37 T:2818005872 M:1935724544   ERROR: Traceback (most recent call last):
                                              File "/home/oscar/.xbmc/addons/plugin.video.free.cable/default.py", line 49, in ?
                                                modes ( )
                                              File "/home/oscar/.xbmc/addons/plugin.video.free.cable/default.py", line 45, in modes
                                                exec 'sitemodule.%s()' % common.args.sitemode
                                              File "<string>", line 1, in ?
                                              File "/home/oscar/.xbmc/addons/plugin.video.free.cable/resources/lib/cbs.py", line 216, in newvideos
                                                for video in itemList:
                                            TypeError: argument 1 must be unicode or str
22:18:37 T:3054524288 M:1935724544   ERROR: GetDirectory - Error getting 
plugin://plugin.video.free.cable/?url="http%3A%2F%2Fwww.cbs.com%2Fcarousels%2F56
23%2Fvideo%2F0_video_small%2Fb6de8288d336e9b7f22b2f69d15c9f9a%2F0%2F400%2F"&mode
="cbs"&sitemode="newvideos"&name="Full+Episodes"
22:18:37 T:3054524288 M:1935724544   ERROR: 
CGUIMediaWindow::GetDirectory(plugin://plugin.video.free.cable/?url="http%3A%2F%
2Fwww.cbs.com%2Fcarousels%2F5623%2Fvideo%2F0_video_small%2Fb6de8288d336e9b7f22b2
f69d15c9f9a%2F0%2F400%2F"&mode="cbs"&sitemode="newvideos"&name="Full+Episodes") 
failed
22:18:37 T:3054524288 M:1935724544 WARNING: GetLabel - Unknown nodetype 
requested 6
22:18:41 T:2809613168 M:1936613376 WARNING: Previous line repeats 1 times.
22:18:41 T:2809613168 M:1936613376 WARNING: FillBuffer: curl failed with code 22
22:18:41 T:2809613168 M:1936613376   ERROR: CFileCurl::CReadState::Open, didn't 
get any data from stream.

Original comment by michaeln...@gmail.com on 7 Dec 2011 at 3:39

GoogleCodeExporter commented 8 years ago
Here is the fix for the CBS channel:

Edit line 226 and change the value for int(video['duration']) to 
str(video['duration']) .

This worked for me.

Original comment by michaeln...@gmail.com on 8 Dec 2011 at 2:11

GoogleCodeExporter commented 8 years ago
Btw this is more a hack as the value should be integer. This will display the 
duration of the clip as a full string instead.

Original comment by michaeln...@gmail.com on 8 Dec 2011 at 2:21

GoogleCodeExporter commented 8 years ago
Excellent michaeln... that change to line 226 cbs.py fixes the problem. I 
believe that error is being returned by the XBMC code which for some reason 
does not believe those integers are in fact integers. 

Original comment by art.r.ta...@gmail.com on 8 Dec 2011 at 3:26

GoogleCodeExporter commented 8 years ago
Yeah for some reason python doesn't see that integer as an integer, seen this 
issue on a few other add-ons today.

Original comment by michaeln...@gmail.com on 8 Dec 2011 at 3:41

GoogleCodeExporter commented 8 years ago
Thanks michaeln! This fixes the problem for me too.

Original comment by lman...@gmail.com on 8 Dec 2011 at 4:07