- arad85 - 2011-01-31
So I have this installed nicely and works well (on Dharma) but I'd like to be able to launch this from a key on the remote. My other plugiun (mythbox) works well with a:
Code: <key id="49">xbmc.runscript(special://home/addons/script.mythbox/default.py)</key>
However the equivalent
Code: <key id="7">xbmc.runscript(special://home/addons/plugin.video.iplayer/default.py)</key>
throws the foillowing error:
Code: 21:01:11 T:2871708528 M:2854563840 INFO: -->Python script returned the following error<--
21:01:11 T:2871708528 M:2854563840 ERROR: Error Type: exceptions.IndexError
21:01:11 T:2871708528 M:2854563840 ERROR: Error Contents: list index out of range
21:01:11 T:2871708528 M:2854563840 ERROR: Traceback (most recent call last):
File "/home/xbmc/.xbmc/addons/plugin.video.iplayer/default.py", line 22, in ?
import addoncompat
File "/home/xbmc/.xbmc/addons/plugin.video.iplayer/lib/addoncompat.py", line 13, in ?
__plugin_handle__ = int(sys.argv[1])
IndexError: list index out of range
21:01:11 T:2871708528 M:2854563840 INFO: -->End of Python script error report<--
Anyone know how to fix this?
- AWilco - 2011-02-03
@ arad85
could you post a bit more of your log?
It will look like this
Code: 18:55:29 T:3021178752 M:3626008576 DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
18:55:29 T:3021178752 M:3626008576 DEBUG: OnKey: return (f00d) pressed, action is Select
18:55:29 T:3021178752 M:3626008576 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.video.iplayer/)
18:55:29 T:3021178752 M:3626008576 DEBUG: ParentPath = [addons://sources/video/]
18:55:29 T:2773928816 M:3626008576 DEBUG: StartScript - calling plugin IPlayer('plugin://plugin.video.iplayer/','0','')
18:55:29 T:2773928816 M:3626008576 INFO: initializing python engine.
18:55:29 T:2773928816 M:3626008576 DEBUG: Loading: /usr/local/lib/xbmc/system/python/python24-i486-linux.so
18:55:29 T:2773928816 M:3626491904 DEBUG: Python wrapper library linked with internal Python library
18:55:30 T:2773928816 M:3633373184 DEBUG: new python thread created. id=7
18:55:30 T:2664848240 M:3633283072 DEBUG: thread start, auto delete: 0
18:55:30 T:2773928816 M:3633283072 DEBUG: WaitOnScriptResult - waiting on the IPlayer plugin...
18:55:30 T:2664848240 M:3633283072 DEBUG: Python thread: start processing
18:55:30 T:2664848240 M:3633938432 NOTICE: -->Python Interpreter Initialized<--
18:55:30 T:2664848240 M:3633938432 DEBUG: Process - The source file to load is /home/alex/.xbmc/addons/plugin.video.iplayer/default.py
18:55:30 T:2664848240 M:3633938432 DEBUG: Process - Setting the Python path to /home/alex/.xbmc/addons/plugin.video.iplayer:/home/alex/.xbmc/addons/script.module.simplejson/lib:/home/alex/.xbmc/addons/script.module.beautifulsoup/lib:/usr/local/lib/xbmc/addons/script.module.pil/lib:/home/alex/.xbmc/addons/script.web.viewer/lib:/usr/local/lib/xbmc/addons/script.module.pysqlite/lib:/usr/local/lib/xbmc/system/python/python24.zip:/usr/local/share/xbmc/system/python/lib/python24.zip:/usr/local/share/xbmc/system/python/lib/python2.4/:/usr/local/share/xbmc/system/python/lib/python2.4/plat-linux2:/usr/local/share/xbmc/system/python/lib/python2.4/lib-tk:/usr/local/share/xbmc/system/python/lib/python2.4/lib-dynload
18:55:30 T:2664848240 M:3633938432 DEBUG: Process - Entering source directory /home/alex/.xbmc/addons/plugin.video.iplayer
18:55:30 T:2664848240 M:3633938432 INFO: -->Python script returned the following error<--
18:55:30 T:2664848240 M:3633938432 ERROR: Error Type: exceptions.SyntaxError
18:55:30 T:2664848240 M:3633938432 ERROR: Error Contents: ('invalid syntax', ('/home/alex/.xbmc/addons/plugin.video.iplayer/default.py', 11, 11, 'throw error\n'))
18:55:30 T:2664848240 M:3633938432 ERROR: File "/home/alex/.xbmc/addons/plugin.video.iplayer/default.py", line 11
throw error
^
SyntaxError: invalid syntax
the line that is needed is the one that looks like this:
Code: 18:55:29 T:2773928816 M:3626008576 DEBUG: StartScript - calling plugin IPlayer('plugin://plugin.video.iplayer/','0','')
as this gives the arguments that are passed to the iplayer plugin. (when you press your key the arguments aren't in the expected format).
- arad85 - 2011-02-03
AWilco Wrote:@ arad85
could you post a bit more of your log?
Code: 19:50:16 T:3055716224 M:2936913920 DEBUG: OnKey: 7 pressed, action is xbmc.runscript(special://home/addons/plugin.video.iplayer/default.py)
19:50:16 T:3055716224 M:2936913920 INFO: initializing python engine.
19:50:16 T:3055716224 M:2936913920 DEBUG: Loading: /usr/lib/xbmc/system/python/python24-i486-linux.so
19:50:16 T:3055716224 M:2936913920 DEBUG: Python wrapper library linked with internal Python library
19:50:16 T:3055716224 M:2936913920 DEBUG: new python thread created. id=2
19:50:16 T:2853174128 M:2936913920 DEBUG: thread start, auto delete: 0
19:50:16 T:2853174128 M:2936913920 DEBUG: Python thread: start processing
19:50:16 T:2853174128 M:2936913920 NOTICE: -->Python Interpreter Initialized<--
19:50:16 T:2853174128 M:2936913920 DEBUG: Process - The source file to load is special://home/addons/plugin.video.iplayer/default.py
19:50:16 T:2853174128 M:2936913920 DEBUG: Process - Setting the Python path to /home/xbmc/.xbmc/addons/plugin.video.iplayer:/home/xbmc/.xbmc/addons/script.module.simplejson/lib:/home/xbmc/.xbmc/addons/script.module.beautifulsoup/lib:/usr/lib/xbmc/addons/script.module.pil/lib:/home/xbmc/.xbmc/addons/script.module.elementtree/lib:/usr/lib/xbmc/addons/script.module.pysqlite/lib:/usr/lib/xbmc/system/python/python24.zip:/usr/share/xbmc/system/python/lib/python24.zip:/usr/share/xbmc/system/python/lib/python2.4/:/usr/share/xbmc/system/python/lib/python2.4/plat-linux2:/usr/share/xbmc/system/python/lib/python2.4/lib-tk:/usr/share/xbmc/system/python/lib/python2.4/lib-dynload
19:50:16 T:2853174128 M:2936913920 DEBUG: Process - Entering source directory /home/xbmc/.xbmc/addons/plugin.video.iplayer
19:50:16 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/time.so. flags: 2
19:50:16 T:2853174128 M:2936913920 DEBUG: Loading: /home/xbmc/.xbmc/temp/time.so
19:50:16 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding time.so (0x9f232d8)
19:50:16 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol inittime
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/strop.so. flags: 2
19:50:17 T:2853174128 M:2936913920 DEBUG: Loading: /home/xbmc/.xbmc/temp/strop.so
19:50:17 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding strop.so (0x986aa58)
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol initstrop
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/_socket.so. flags: 2
19:50:17 T:2853174128 M:2937040896 DEBUG: Loading: /home/xbmc/.xbmc/temp/_socket.so
19:50:17 T:2853174128 M:2937040896 DEBUG: RegisterExtensionLib, adding _socket.so (0x9f82028)
19:50:17 T:2853174128 M:2937040896 DEBUG: xbp_dlsym - load symbol init_socket
19:50:17 T:2853174128 M:2937040896 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/_ssl.so. flags: 2
19:50:17 T:2853174128 M:2937040896 DEBUG: Loading: /home/xbmc/.xbmc/temp/_ssl.so
19:50:17 T:2853174128 M:2937040896 DEBUG: RegisterExtensionLib, adding _ssl.so (0xa2eef88)
19:50:17 T:2853174128 M:2937040896 DEBUG: xbp_dlsym - load symbol init_ssl
19:50:17 T:2853174128 M:2937040896 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/math.so. flags: 2
19:50:17 T:2853174128 M:2937040896 DEBUG: Loading: /home/xbmc/.xbmc/temp/math.so
19:50:17 T:2853174128 M:2937040896 DEBUG: RegisterExtensionLib, adding math.so (0x9a397d8)
19:50:17 T:2853174128 M:2937040896 DEBUG: xbp_dlsym - load symbol initmath
19:50:17 T:2853174128 M:2937040896 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/binascii.so. flags: 2
19:50:17 T:2853174128 M:2937040896 DEBUG: Loading: /home/xbmc/.xbmc/temp/binascii.so
19:50:17 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding binascii.so (0x9e5ac08)
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol initbinascii
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/_random.so. flags: 2
19:50:17 T:2853174128 M:2936913920 DEBUG: Loading: /home/xbmc/.xbmc/temp/_random.so
19:50:17 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding _random.so (0x9afb7b0)
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol init_random
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/fcntl.so. flags: 2
19:50:17 T:2853174128 M:2936913920 DEBUG: Loading: /home/xbmc/.xbmc/temp/fcntl.so
19:50:17 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding fcntl.so (0xa0382e0)
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol initfcntl
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/cStringIO.so. flags: 2
19:50:17 T:2853174128 M:2936913920 DEBUG: Loading: /home/xbmc/.xbmc/temp/cStringIO.so
19:50:17 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding cStringIO.so (0x9a41db8)
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol initcStringIO
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/collections.so. flags: 2
19:50:17 T:2853174128 M:2936913920 DEBUG: Loading: /home/xbmc/.xbmc/temp/collections.so
19:50:17 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding collections.so (0x9f78e18)
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol initcollections
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/operator.so. flags: 2
19:50:17 T:2853174128 M:2936913920 DEBUG: Loading: /home/xbmc/.xbmc/temp/operator.so
19:50:17 T:2853174128 M:2936913920 DEBUG: RegisterExtensionLib, adding operator.so (0x9947230)
19:50:17 T:2853174128 M:2936913920 DEBUG: xbp_dlsym - load symbol initoperator
19:50:17 T:2853174128 M:2936913920 INFO: -->Python script returned the following error<--
19:50:17 T:2853174128 M:2936913920 ERROR: Error Type: exceptions.IndexError
19:50:17 T:2853174128 M:2936913920 ERROR: Error Contents: list index out of range
19:50:17 T:2853174128 M:2936913920 ERROR: Traceback (most recent call last):
File "/home/xbmc/.xbmc/addons/plugin.video.iplayer/default.py", line 22, in ?
import addoncompat
File "/home/xbmc/.xbmc/addons/plugin.video.iplayer/lib/addoncompat.py", line 13, in ?
__plugin_handle__ = int(sys.argv[1])
IndexError: list index out of range
19:50:17 T:2853174128 M:2936913920 INFO: -->End of Python script error report<--
19:50:17 T:3055716224 M:2936913920 INFO: Loading skin file: DialogKaiToast.xml
19:50:17 T:3055716224 M:2936913920 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
19:50:17 T:2853174128 M:2936913920 INFO: Python script stopped
19:50:17 T:2853174128 M:2936913920 DEBUG: Thread 2853174128 terminating
19:50:17 T:3055716224 M:2938085376 DEBUG: python thread 2 destructed
19:50:22 T:3055716224 M:2938081280 DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
19:50:27 T:3055716224 M:2938097664 INFO: Python, unloading python24.dll because no scripts are running anymore
19:50:27 T:3055716224 M:2938097664 DEBUG: UnloadExtensionLibs, clearing python extension libraries
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: time.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: strop.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: _socket.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: _ssl.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: math.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: binascii.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: _random.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: fcntl.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: cStringIO.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: collections.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: operator.so
19:50:27 T:3055716224 M:2938097664 DEBUG: Unloading: python24-i486-linux.so
With the key defined as:
Code: <key id="7">xbmc.runscript(special://home/addons/plugin.video.iplayer/default.py)</key>
- AWilco - 2011-02-04
try:
Code: <key id="7">xbmc.runaddon(plugin.video.iplayer)</key>
- arad85 - 2011-02-04
Nope.. I get:
Code: 20:32:45 T:3055310720 M:2960113664 DEBUG: OnKey: 7 pressed, action is XBMC.ActivateWindow(MyVideos)
Yes, I know that doesn't bear any resemblance to the command I expected it to but... (I checked it by changing both the runaddon command and key). There doesn't seem to be a runaddon. If I change it to runplugin I get:
Code: 20:35:30 T:3077764992 M:2961227776 DEBUG: OnKey: 7 pressed, action is xbmc.runplugin(plugin.video.iplayer)
20:35:39 T:3077764992 M:2961235968 DEBUG: Previous line repeats 1 times.
20:35:39 T:3077764992 M:2961235968 DEBUG: OnKey: 166 pressed, action is Up
20:35:41 T:3077764992 M:2961235968 DEBUG: OnKey: 167 pressed, action is Down
- AWilco - 2011-02-05
that XBMC.ActivateWindow is a good sign.
runaddon converts the call into an ActivateWindow command, which is what addons like iPlayer are expecting (as they return a list of menu items).
Does nothing happen at all, or does it open the wrong window? again a larger log around that area would be good. Sorry I can't test this directly as I don't use a remote.
- arad85 - 2011-02-05
AWilco Wrote:that XBMC.ActivateWindow is a good sign. No it isn't as that's what the key is defined as before it gets redefined. Basically, the xml definition that you suggested gets ignored by xbmc hence why I tried the other definition (after googling a bit).
AWilco Wrote:Does nothing happen at all, or does it open the wrong window? again a larger log around that area would be good. Sorry I can't test this directly as I don't use a remote. The wrong window opens and is what the default for the key is without an override in the definitions file. As to debugging, you could define a key on your keyboard to run this - they should be equivalent defines once they work.
Looking at the debug, the script appears to be failing due to missing arguments (it fails on sys.argv[1]). I can't for the life of me work out how to pass arguments (which appear to be '0'. '') using the runscript command.
- AWilco - 2011-02-05
arad85 Wrote:No it isn't as that's what the key is defined as before it gets redefined. Basically, the xml definition that you suggested gets ignored by xbmc hence why I tried the other definition (after googling a bit).
The wrong window opens and is what the default for the key is without an override in the definitions file. As to debugging, you could define a key on your keyboard to run this - they should be equivalent defines once they work.
Looking at the debug, the script appears to be failing due to missing arguments (it fails on sys.argv[1]). I can't for the life of me work out how to pass arguments (which appear to be '0'. '') using the runscript command.
okay, I tried this out (thanks for the tip!). And the following works for me
Code: <eight>xbmc.runaddon(plugin.video.iplayer)</eight>
or
Code: <eight>runaddon(plugin.video.iplayer)</eight>
If this doesn't work, try copying your keyboard.xml file to /.xbmc/userdata/keymaps/ directory as opposed to the /system/keymaps/ directory. For some reason I couldn't get any changes I made to the keyboard.xml file in there to work.
iPlayer is not a script, it's an addon. There is a difference as to how it works, as an addon expects certain input arguments (thus the error here) and also expects XBMC to do something with it's output, which it wouldn't if it were treated as a script.
- arad85 - 2011-02-06
Runaddon seems to do nothing for me
Got it to work with:
Code: <key id="7">xbmc.ActivateWindow(VideoFiles,plugin://plugin.video.iplayer)</key>
Thanks for your help
- dchurch24 - 2011-02-07
Is there a log file output from this script?
All I get is "Script Failed: IPlayer" if I try to run it. That said, the version in the link seems somewhat out of date (Sept 18), so it could be the wrong version I'm trying to run.
I'm running Dharma on Win7.
- AWilco - 2011-02-07
dchurch24 Wrote:Is there a log file output from this script?
All I get is "Script Failed: IPlayer" if I try to run it. That said, the version in the link seems somewhat out of date (Sept 18), so it could be the wrong version I'm trying to run.
I'm running Dharma on Win7.
iPlayer logs to the standard XBMC log (/.xbmc/temp/xbmc.log), so look there for the cause of the error. Post it here and we'll try and help.
you are 1 change out of date with that build, but nothing major changed I don't think. If you want try downloading the latest source from http://xbmc-iplayerv2.googlecode.com/svn/trunk/IPlayer/
Apple TV 2 - Rimms - 2011-02-09
Hi, new to the forum!
I'm having problems getting iPlayer to run on the latest release of XBMC on my jailbroken AppleTV 2nd Gen.
Have placed the 'plugin.video.iplayer' file (v2.3.2) into 'addons' via Transmit software, and can access all menus through Videos/Addons/iPlayer in XBMC.
The problem concerns playing the actual content.
i) It will load the directory of a 'highlighted' program, and then cut out after briefly showing the video.
ii) It won't play live content, and will crash out.
It does flag up a message saying that i'm using an outdated v.XBMC but as far as i'm aware this release is only a day or two old?!
Cheers
- anarchintosh - 2011-02-12
try accessing Addon Settings and changing Protocol setting, might work.
- Rimms - 2011-02-13
anarchintosh Wrote:try accessing Addon Settings and changing Protocol setting, might work.
Didn't work for me, given up!
I've just re-jailbroken the Apple TV using new greenpois0n rc 6 (untethered), and that's allowed use of some other XBMC plugins that previously weren't working, but still no luck with iPlayer. Tried pretty much all variables in XBMC and file structure
Cheers anyway.
- sprite1 - 2011-02-14
MOD please remove
|