Kodi Community Forum
[OBSOLETE] Pandora Radio (Script) Music Addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=148)
+---- Thread: [OBSOLETE] Pandora Radio (Script) Music Addon (/showthread.php?tid=70471)



- TechLife - 2011-08-25

There is a "contact" button on the XBMC commander website: xbmc-commander.com

You may try dropping a line there and see if the dev can help you out. I'm guessing you simply need a button or gesture or something that sends the equivalent of "Home Menu".

It can't hurt right?


- toymachine2009 - 2011-08-26

TechLife Wrote:There is a "contact" button on the XBMC commander website: xbmc-commander.com

You may try dropping a line there and see if the dev can help you out. I'm guessing you simply need a button or gesture or something that sends the equivalent of "Home Menu".

It can't hurt right?

on xbmc commander my backout button would be double tap to backout and works for EVERYTHING else within xbmc just not this add-on. So if there is a way I can figure out how to do that it would be great. Like I said ill work on that this evening thanks for all your help.


- spbogie - 2011-08-27

From the screenshots on the xbmc-commander website, it looks like Esc/Go Back should be a 2-finger tap.


- htpc guy - 2011-08-27

Here is an excerpt from the log file. The error states there is not enough arguments. Let me know if you need the whole thing but I'm sure this is it.

If I delete the Pandora Userdata folder then I can enter the program the next time I load XBMC but it will fail every time after that.

This is the same error that garbear got. I'm running win7 and nightly build dated 8-24-2011.



Code:
23:01:26 T:5340  NOTICE: PANDORA: Loading key from file "C:\Users\Matt\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.pandora\key_in"
23:01:26 T:5340    INFO: -->Python script returned the following error<--
23:01:26 T:5340   ERROR: Error Type: <type 'exceptions.TypeError'>
23:01:26 T:5340   ERROR: Error Contents: not enough arguments for format string
23:01:26 T:5340   ERROR: Traceback (most recent call last):
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\default.py", line 235, in <module>
                                                panda = Panda()
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\default.py", line 60, in __init__
                                                self.pandora = Pandora( dataDir, fmt )
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\libpandora\pandora.py", line 33, in __init__
                                                if not self.keys.loadKeys():
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\libpandora\keys.py", line 35, in loadKeys
                                                "key_in" ) )
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\libpandora\keys.py", line 107, in _loadKeyFromFile
                                                print "PANDORA: Unexpected error:%s:%s" %sys.exc_info()[0:1]
                                            TypeError: not enough arguments for format string
23:01:26 T:5340    INFO: -->End of Python script error report<--



- toymachine2009 - 2011-08-27

spbogie Wrote:From the screenshots on the xbmc-commander website, it looks like Esc/Go Back should be a 2-finger tap.

Have tried that many times do I need to edit the keymap.XML file to get that working?

EDIT: So I plugged in keyboard and backspace does not backlit but esc does.. So I gotta try to edit the XML file to use backspace to back out.

I can't find any keymap.XML to edit.. Any clue to where it is?


- TechLife - 2011-08-27

toymachine2009 Wrote:I can't find any keymap.XML to edit.. Any clue to where it is?

http://wiki.xbmc.org/index.php?title=Modifying_keyboard.xml

--

@spbogie - Out of curiosity (because I know squat about writing py for XBMC and how the two interact) is there theoretically a way to modify the script to accept the 'Parent Directory' command as an exit command instead of the 'Home Menu' command or is it a function of XBMC that requires 'Parent Directory' to know that you want a script to exit?


- toymachine2009 - 2011-08-27

So I have to edit keyboard.XML? Wouldnt that screw with the rest of my settings for rest of xbmc? I don't understand why this one addon is so complicated to back out of while my other 7 work fine and rest of xbmc works the same way.. So I have to reconfigure ALL my xbmc settings for this add-on.

This seems like way to much work for an add-on.. I just think I'm going to stop using pandora add-on I wish I could use it but it just isn't ready yet.


- Skidd - 2011-08-28

Just wanted to add a Gratuitous "Thanks!!" for this plugin!
It's working awesome on my system!


- JohnVee - 2011-08-28

htpc guy Wrote:Here is an excerpt from the log file. The error states there is not enough arguments. Let me know if you need the whole thing but I'm sure this is it.

If I delete the Pandora Userdata folder then I can enter the program the next time I load XBMC but it will fail every time after that.

This is the same error that garbear got. I'm running win7 and nightly build dated 8-24-2011.



Code:
23:01:26 T:5340  NOTICE: PANDORA: Loading key from file "C:\Users\Matt\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.pandora\key_in"
23:01:26 T:5340    INFO: -->Python script returned the following error<--
23:01:26 T:5340   ERROR: Error Type: <type 'exceptions.TypeError'>
23:01:26 T:5340   ERROR: Error Contents: not enough arguments for format string
23:01:26 T:5340   ERROR: Traceback (most recent call last):
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\default.py", line 235, in <module>
                                                panda = Panda()
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\default.py", line 60, in __init__
                                                self.pandora = Pandora( dataDir, fmt )
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\libpandora\pandora.py", line 33, in __init__
                                                if not self.keys.loadKeys():
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\libpandora\keys.py", line 35, in loadKeys
                                                "key_in" ) )
                                              File "C:\Users\Matt\AppData\Roaming\XBMC\addons\xbmc-pandora\libpandora\keys.py", line 107, in _loadKeyFromFile
                                                print "PANDORA: Unexpected error:%s:%s" %sys.exc_info()[0:1]
                                            TypeError: not enough arguments for format string
23:01:26 T:5340    INFO: -->End of Python script error report<--


I am having the exact same problem here. Works the first time you run the script, but every time after that, I'm getting script failed.

The only way to get it to work again is to delete the script and reinstall...Only works for the first time again though. Any thoughts? Does this happen to anybody else?


- 18.4009 - 2011-08-28

JohnVee Wrote:I am having the exact same problem here. Works the first time you run the script, but every time after that, I'm getting script failed.

The only way to get it to work again is to delete the script and reinstall...Only works for the first time again though. Any thoughts? Does this happen to anybody else?

I'm having the exact same issue... Really frustrating since I finally got my htpc build and tossed the apple tv.


- Shalun - 2011-08-28

htpc guy Wrote:If I delete the Pandora Userdata folder then I can enter the program the next time I load XBMC but it will fail every time after that.

This is the same error that garbear got. I'm running win7 and nightly build dated 8-24-2011.

I am having the same script failure as htpc guy and garbear.

I am using nightly 8-27-2011 w/Windows 7 64 bit with the same symptoms. Quoted work around above also works.

If you need my logs, let me know.

ty


- garbear - 2011-08-29

Hey all,

I highly recommend following XBMC-Pandora on gitorius: http://gitorious.org/xbmc-pandora/.../commits (*rss). You'll see things like this (August 22) and this (August 25) that relate to both the Keymap.xml error and the crash-on-second-start error. Now, you can see if a change was made that might fix your problem by using the most recent version of the script (referred to as the git HEAD). In this case, updating has two benefits:

It might fix your error. (as with the keymap problem)

If it is still broken, your bug report will be twice as relevant. (as with the crash-on-second-start error)


- garbear - 2011-08-29

Sorry it took so long spbogie, I ran the script with the bf5fd43 change, and got the following error message:

Code:
PANDORA: Loading key from file "C:\Users\Garrett\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.pandora\key_in"
PANDORA: Unexpected error:<type 'exceptions.ImportError'>:No module named keys
-->Python script returned the following error<--
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named keys
Traceback (most recent call last):
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\default.py", line 235, in <module>
    panda = Panda()
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\default.py", line 60, in __init__
    self.pandora = Pandora( dataDir, fmt )
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\pandora.py", line 33, in __init__
    if not self.keys.loadKeys():
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\keys.py", line 35, in loadKeys
    "key_in" ) )
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\keys.py", line 99, in _loadKeyFromFile
    key = pickle.load( f )
  File "C:\Users\Garrett\Documents\XBMC\system\python\Lib\pickle.py", line 1370, in load
    return Unpickler(file).load()
  File "C:\Users\Garrett\Documents\XBMC\system\python\Lib\pickle.py", line 858, in load
    dispatch[key](self)
  File "C:\Users\Garrett\Documents\XBMC\system\python\Lib\pickle.py", line 1069, in load_inst
    klass = self.find_class(module, name)
  File "C:\Users\Garrett\Documents\XBMC\system\python\Lib\pickle.py", line 1124, in find_class
    __import__(module)
ImportError: No module named keys
-->End of Python script error report<--

EDIT: This might help a little. I went to Addons -> Pandora -> Settings and did a "Force Re-Fetch Keys" and this flew into my debug log. It looks like the path to the keys file isn't being translated from the special:// protocol correctly?
Code:
PANDORA: Forcing key ReDownload
PANDORA: Loading key from file "special://profile/addon_data/script.xbmc.pandora\key_in"
PANDORA: Downloading key from url "https://raw.github.com/PromyLOPh/pianobar/master/src/libpiano/crypt_key_input.h"
PANDORA: Loading key from file "special://profile/addon_data/script.xbmc.pandora\key_out"
PANDORA: Downloading key from url "https://raw.github.com/PromyLOPh/pianobar/master/src/libpiano/crypt_key_output.h"
PANDORA: Saving keys
PANDORA: dataDir = "special://profile/addon_data/script.xbmc.pandora"
PANDORA: dataDir.isDir? False
-->Python script returned the following error<--
Error Type: <type 'exceptions.IOError'>
Error Contents: (22, "invalid mode ('w') or filename", 'special://profile/addon_data/script.xbmc.pandora\\key_in')
Traceback (most recent call last):
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora/refetch.py", line 12, in <module>
    keys.forceReFetch()
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\keys.py", line 89, in forceReFetch
    return self.loadKeys( True );
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\keys.py", line 63, in loadKeys
    self.saveKeys()
  File "C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\libpandora\keys.py", line 72, in saveKeys
    f = open( os.path.join( self._dataDir, "key_in" ), "w" )
IOError: (22, "invalid mode ('w') or filename", 'special://profile/addon_data/script.xbmc.pandora\\key_in')
-->End of Python script error report<--



- toymachine2009 - 2011-08-29

^^ I wonder if thats my problem as well on one of my HTPC's pandora keeps failing to fetch keys but on another works...


- toymachine2009 - 2011-08-29

garbear Wrote:Hey all,

I highly recommend following XBMC-Pandora on gitorius: http://gitorious.org/xbmc-pandora/.../commits (*rss). You'll see things like this (August 22) and this (August 25) that relate to both the Keymap.xml error and the crash-on-second-start error. Now, you can see if a change was made that might fix your problem by using the most recent version of the script (referred to as the git HEAD). In this case, updating has two benefits:

It might fix your error. (as with the keymap problem)

If it is still broken, your bug report will be twice as relevant. (as with the crash-on-second-start error)

Okay I see on Aug 22nd there was a fix on the back navigation... How would I go about updating this on my Pandora? uninstall add-on and reinstall?