XBMC Community Forum
[RELEASE] Pandora Radio (Script) Music Addon (Updated 2011-11-13 : V1.2.8) - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (/forumdisplay.php?fid=148)
+---- Thread: [RELEASE] Pandora Radio (Script) Music Addon (Updated 2011-11-13 : V1.2.8) (/showthread.php?tid=70471)



- garbear - 2011-08-25 03:38

Here's the error I get on my system (python 2.6, GIT head). The line print "PANDORA: Unexpected error:%s:%s" %sys.exc_info()[0:1] throws the error "TypeError: not enough arguments for format string". Apparently the error occurs in the error-handling code. Oh, the irony.

Code:
CApplication::ProcessMouse: trying mouse action leftclick
initializing python engine.
new python thread created. id=1
Thread XBPyThread start, auto delete: 0
Python thread: start processing
HttpApi Start command: broadcastlevel  paras: broadcastlevel; OnAction:100;2
UDPCLIENT TX: 39892        -> '<b>OnAction:100;2</b>'
-->Python Interpreter Initialized<--
XBPyThread::Process - The source file to load is C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora\default.py
XBPyThread::Process - Setting the Python path to C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora;C:\Users\Garret​t\AppData\Roaming\XBMC\addons\script.module.simplejson\lib;C:\Users\Garrett\AppD​ata\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Users\Garrett\Documen​ts\XBMC\addons\script.module.pil\lib;C:\Users\Garrett\Documents\XBMC\addons\scri​pt.module.pysqlite\lib;C:\Users\Garrett\Documents\XBMC\system\python\DLLs;C:\Use​rs\Garrett\Documents\XBMC\system\python\Lib;C:\Users\Garrett\Documents\XBMC\proj​ect\VS2010Express\XBMC\Debug (DirectX)\python26.zip;C:\Users\Garrett\Documents\XBMC\system\python\lib\plat-win;C:\Users\Garrett\Documents\XBMC\system\python\lib\lib-tk;C:\Users\Garrett\Documents\XBMC\project\VS2010Express\XBMC\Debug (DirectX);C:\Users\Garrett\Documents\XBMC\system\python;C:\Users\Garrett\Documen​ts\XBMC\system\python\lib\site-packages;
XBPyThread::Process - Entering source directory C:\Users\Garrett\AppData\Roaming\XBMC\addons\script.xbmc.pandora
Instantiating addon using automatically obtained id of "script.xbmc.pandora" dependent on version 1.0 of the xbmc.python api
PANDORA: Initializing v1.2.4
PANDORA: sys.platform = win32
Loading skin file: DialogProgress.xml
Load DialogProgress.xml: 22.86ms
DialogProgress::StartModal called
------ Window Init (DialogProgress.xml) ------
Alloc resources: 11.41ms (0.02 ms skin load)
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\pyexpat.pyd', Cannot find or open the PDB file
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\_hashlib.pyd', Cannot find or open the PDB file
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\_socket.pyd', Cannot find or open the PDB file
'XBMC.exe': Loaded 'C:\Users\Garrett\Documents\XBMC\system\python\DLLs\_ssl.pyd', Cannot find or open the PDB file
XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://feeds.feedburner.com (easy=09FFBF90, multi=0A004810)
PANDORA: Loading key from file "C:\Users\Garrett\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.pandora\ke​y_in"
-->Python script returned the following error<--
Error Type: <type 'exceptions.TypeError'>
Error Contents: not enough arguments for format string
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\pand​ora.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 107, in _loadKeyFromFile
    print "PANDORA: Unexpected error:%s:%s" %sys.exc_info()[0:1]
TypeError: not enough arguments for format string
-->End of Python script error report<--
------ Window Init (DialogKaiToast.xml) ------
Alloc resources: 0.02ms (0.02 ms skin load)
Python script stopped
Thread XBPyThread 4256 terminating
The thread 'XBPyThread' (0x10a0) has exited with code 123 (0x7b).
waiting for python thread 1 to stop
python thread 1 destructed



- spbogie - 2011-08-25 13:37

garbear,
Doh, stupid mistake. Change [0:1] on that line to [0:2]. Fixed in git, but if it's getting there then it was going to error anyways so not really worth pushing everyone to a new version over. Should be a simple correction to make on your end, and come back with a more useful log.

htpc_guy,
Should be %APPDATA%\XBMC\ unless they moved it in the nightlies.


- toymachine2009 - 2011-08-25 18:14

toymachine2009 Wrote:Quick question. Or actually 2 questions.

I use xbmc commander to control xbmc. First question I cannot figure out for the life of me how to exit pandora I have to close xbmc and open it again to get back to main menu.

2nd question when I click the down arrow pandora screen goes away and you see the visualizations going but I cannot figure out how to get the pandora menu back.

Also are you able to add artists in this addon or can only be done on computer or iPad or whatever..


Edit: installed pandora on one htpc it worked went to my other I keep getting error unable to fetch keys. I triple checked login info not sure what else to do?

Bump.. Still have not figured out how to close Pandora without restarting xbmc..


- TechLife - 2011-08-25 18:35

toymachine2009 Wrote:Still have not figured out how to close Pandora without restarting xbmc..

If you check the keymap.xml, you will find there are two commands that will typically take you back - there is the esc key which is Home Menu and the Bksp which is Parent Directory. Bksp I have found will typically take you back to the previous screen and is what my back button on my remote is mapped to. I have found, for whatever reason, this will NOT take you back out of Pandora. I actually have to use esc. I haven't gotten around to remapping a button for it. If I had to guess, this is the issue you are facing. I don't have any experience with commander so I can't tell you exactly how to fix it but hopefully this will lead you down the right path...


- toymachine2009 - 2011-08-25 22:13

TechLife Wrote:If you check the keymap.xml, you will find there are two commands that will typically take you back - there is the esc key which is Home Menu and the Bksp which is Parent Directory. Bksp I have found will typically take you back to the previous screen and is what my back button on my remote is mapped to. I have found, for whatever reason, this will NOT take you back out of Pandora. I actually have to use esc. I haven't gotten around to remapping a button for it. If I had to guess, this is the issue you are facing. I don't have any experience with commander so I can't tell you exactly how to fix it but hopefully this will lead you down the right path...

Thank you it has given me somewhat of an idea to get started I will work on that tonight then. Thanks Atleast someone replied haha for days its been really annoying having to restart xbmc.

There has to be someone out there using xbmc commander on ipad or iphone who uses pandora.. Ill work on what you said in the mean time.


- TechLife - 2011-08-25 22:35

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 00:59

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 04:17

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 06:12

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_i​n"
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 06:16

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?