akukic1 / bluecop-xbmc-repo

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

Unable to enter My Library #89

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Go to Video Add-ons
2. Select Amazon
3. Select My Library
4. Select My Movies

Error: Script Failed!

What is the expected output? What do you see instead?
I expect to see my movie rentals in the list.

What version of the product are you using? On what operating system?
I'm using Amazon plugin 0.37 from the 1.0.1 repo on Ubuntu 10.10 x64.

Please provide any additional information below.
Here's the error log:
  ====================AMAZON START====================
10:57:38 T:140281282295552 M:5396160512   ERROR: 
/home/patrick/.xbmc/addons/plugin.video.amazon/resources/lib/common.py:57: 
DeprecationWarning: os.getcwd() currently lies to you so please use 
addon.getAddonInfo('path') to find the script's root directory and DO NOT make 
relative path accesses based on the results of 'os.getcwd.' 
                                              except:fanart = os.path.join(os.getcwd().replace(';', ''),'fanart.jpg')
10:57:38 T:140281282295552 M:5396160512   ERROR: 
/home/patrick/.xbmc/addons/plugin.video.amazon/resources/lib/common.py:61: 
DeprecationWarning: os.getcwd() currently lies to you so please use 
addon.getAddonInfo('path') to find the script's root directory and DO NOT make 
relative path accesses based on the results of 'os.getcwd.' 
                                              except:thumb = os.path.join(os.getcwd().replace(';', ''),'icon.png')

Original issue reported on code.google.com by plac...@gmail.com on 20 Dec 2011 at 6:58

GoogleCodeExporter commented 8 years ago
Root cause appears to be an undefined global 'name' in library.py:

11:31:42 T:140281362937600 M:5406515200  NOTICE: getURL: 
https://www.amazon.com/gp/video/library/movie?show=all&sort=alpha
11:31:43 T:140281971382208 M:5406408704   DEBUG: ------ Window Init 
(DialogBusy.xml) ------
11:31:43 T:140281971382208 M:5406408704   DEBUG: Alloc resources: 0.00ms (0.00 
ms skin load)
11:31:43 T:140281971382208 M:5409312768   DEBUG: SDLKeyboard: scancode: 6c, 
sym: 0133, unicode: 0000, modifier: 0
11:31:43 T:140281971382208 M:5409312768   DEBUG: GetActionCode: Trying Hardy 
keycode for 0xf200
11:31:43 T:140281971382208 M:5409312768   DEBUG: Previous line repeats 2 times.
11:31:43 T:140281971382208 M:5409312768   DEBUG: OnKey: 0 (f200) pressed, 
action is
11:31:43 T:140281362937600 M:5409312768    INFO: -->Python script returned the 
following error<--
11:31:43 T:140281362937600 M:5409312768   ERROR: Error Type: <type 
'exceptions.TypeError'>
11:31:43 T:140281362937600 M:5409312768   ERROR: Error Contents: argument of 
type 'NoneType' is not iterable
11:31:43 T:140281362937600 M:5409312768   ERROR: Traceback (most recent call 
last):
                                              File "/home/patrick/.xbmc/addons/plugin.video.amazon/default.py", line 52, in <module>
                                                modes ( )
                                              File "/home/patrick/.xbmc/addons/plugin.video.amazon/default.py", line 50, in modes
                                                exec 'sitemodule.%s()' % common.args.sitemode
                                              File "<string>", line 1, in <module>
                                              File "/home/patrick/.xbmc/addons/plugin.video.amazon/resources/lib/library.py", line 43, in LIBRARY_LIST_MOVIES
                                                common.addVideo(name,url,thumb,fanart,infoLabels=infoLabels,totalItems=totalItems)
                                              File "/home/patrick/.xbmc/addons/plugin.video.amazon/resources/lib/common.py", line 78, in addVideo
                                                u += '&name="'+urllib.quote_plus(name)+'"'
                                              File "/usr/lib/python2.6/urllib.py", line 1229, in quote_plus
                                                if ' ' in s:

Original comment by plac...@gmail.com on 20 Dec 2011 at 7:42

GoogleCodeExporter commented 8 years ago
Work around is to add this line for a global in your 
.xbmc/addons/plugin.video.amazon/resources/lib/library.py

pluginhandle = common.pluginhandle
confluence_views = [500,501,502,503,504,508]
name = 'My Movie' # add this line 
################################ Library listing    
def LIBRARY_ROOT():
    common.addDir('Movie Library','library','LIBRARY_LIST_MOVIES','https://www.amazon.com/gp/video/library/movie?show=all&sort=alpha')
.....

Adding

   name = 'My Movie' # add this line 

Prevents the global error and will allow you to see your rentals.  The problem 
though is that the name of every rental will be 'My Movie' but at least you'll 
see your rented movies.

Original comment by plac...@gmail.com on 20 Dec 2011 at 7:44