[LINUX] 10th April PVR Build Breaks Addons?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Prof Yaffle Offline
Donor
Posts: 1,118
Joined: Mar 2011
Reputation: 25
Location: UK - in the middlish (mostly).
Post: #1
Not my day... two new threads on the forum in a couple of hours!

I (literally) just picked up today's new build of Lars Opdenkamp's PPA - and I'm having addon problems. At the least, Executor no longer wants to play:

Code:
17:10:42 T:4884288 M:2761351168   DEBUG: LIRC: Update - NEW at 75431:000000037ff07bdd 00 OK mceusb (OK)
17:10:42 T:4884288 M:2761351168   DEBUG: OnKey: 11 (0b) pressed, action is Select
17:10:42 T:4884288 M:2761351168   DEBUG: ExecuteXBMCAction : Translating RunPlugin("plugin://plugin.program.executor/?do=program&id=xterm")
17:10:42 T:4884288 M:2761351168   DEBUG: ExecuteXBMCAction : To RunPlugin("plugin://plugin.program.executor/?do=program&id=xterm")
17:10:42 T:4884288 M:2761351168   DEBUG: RunScriptWithParams - calling plugin Executor('plugin://plugin.program.executor/','-1','?do=program&id=xterm')
17:10:42 T:4884288 M:2761351168    INFO: initializing python engine.
17:10:42 T:4884288 M:2761097216   DEBUG: new python thread created. id=1
17:10:42 T:107731824 M:2761097216   DEBUG: Thread XBPyThread start, auto delete: 0
17:10:42 T:107731824 M:2761097216   DEBUG: Python thread: start processing
17:10:42 T:107731824 M:2761097216  NOTICE: -->Python Interpreter Initialized<--
17:10:42 T:107731824 M:2761097216   DEBUG: Process - The source file to load is /home/xbmc/.xbmc/addons/plugin.program.executor/default.py
17:10:42 T:107731824 M:2761097216   DEBUG: Process - Setting the Python path to /home/xbmc/.xbmc/addons/plugin.program.executor:/home/xbmc/.xbmc/addons/script.module.dialogaddonscan/lib:/home/xbmc/.xbmc/addons/script.module.beautifulsoup/lib:/usr/share/xbmc/addons/script.module.pil/lib:/usr/share/xbmc/addons/script.module.pysqlite/lib:/usr/lib/python2.6:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload:/usr/lib/python2.6/dist-packages:/usr/lib/pymodules/python2.6:/usr/local/lib/python2.6/dist-packages:
17:10:42 T:107731824 M:2761097216   DEBUG: Process - Entering source directory /home/xbmc/.xbmc/addons/plugin.program.executor
17:10:42 T:107731824 M:2760429568   DEBUG: ADDON: cpluff: 'Could not return information about unknown plug-in .'
17:10:42 T:107731824 M:2760429568    INFO: -->Python script returned the following error<--
17:10:42 T:107731824 M:2760429568   ERROR: Error Type: <type 'exceptions.Exception'>
17:10:42 T:107731824 M:2760429568   ERROR: Error Contents: Could not get AddonPtr!
17:10:42 T:107731824 M:2760429568   ERROR: Traceback (most recent call last):
                                              File "/home/xbmc/.xbmc/addons/plugin.program.executor/default.py", line 13, in <module>
                                                import resources.lib.executor as plugin
                                              File "/home/xbmc/.xbmc/addons/plugin.program.executor/resources/lib/executor.py", line 4, in <module>
                                                Addon = xbmcaddon.Addon(id=os.path.basename(os.getcwd()))
                                            Exception: Could not get AddonPtr!
17:10:42 T:107731824 M:2760429568    INFO: -->End of Python script error report<--
17:10:42 T:4884288 M:2760429568   DEBUG: ------ Window Deinit (DialogFavourites.xml) ------
17:10:42 T:107731824 M:2760429568    INFO: Python script stopped
17:10:42 T:107731824 M:2760429568   DEBUG: Thread Python Thread 107731824 terminating
17:10:42 T:4884288 M:2760429568   DEBUG: waiting for python thread 1 to stop
17:10:42 T:4884288 M:2760429568   DEBUG: python thread 1 destructed
17:10:42 T:4884288 M:2760429568    INFO: Loading skin file: DialogKaiToast.xml
17:10:42 T:4884288 M:2760429568   DEBUG: Load DialogKaiToast.xml: 6.02ms
17:10:42 T:4884288 M:2760556544   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
17:10:42 T:4884288 M:2760556544   DEBUG: Alloc resources: 0.01ms (0.01 ms skin load)
17:10:47 T:4884288 M:2760515584   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
17:10:52 T:4884288 M:2760536064    INFO: Python, unloading python shared library because no scripts are running anymore
17:10:52 T:4884288 M:2760536064   DEBUG: UnloadExtensionLibs, clearing python extension libraries
17:10:56 T:4884288 M:2760536064   DEBUG: SECTION:UnloadDll(libcurl-gnutls.so.4)
17:10:56 T:4884288 M:2760536064   DEBUG: Unloading: libcurl-gnutls.so.4

Any thoughts?? I have no clue at all about Python, and my C is 20 years out of date, so it's a long night's debugging otherwise...

EDIT

I suppose it *might* be related to this API change, although I would have thought that these changes would have broken the add-on earlier given Dushmaniac's intentions on the merge schedule. If so, and if it's a general XBMC API change, then Executor will break for mainline users as well, I suspect... but it shouldn't be PVR-specific...
(This post was last modified: 2011-04-10 19:12 by Prof Yaffle.)
find quote
opdenkamp Offline
Team-XBMC PVR Developer
Posts: 2,221
Joined: Feb 2009
Reputation: 29
Location: Heerlen, The Netherlands
Post: #2
this has nothing to do with pvr but with changes in mainline xbmc. we're no longer using an ancient python. that executor plugin you're using probably can't handle that newer version yet.

opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
find quote
Prof Yaffle Offline
Donor
Posts: 1,118
Joined: Mar 2011
Reputation: 25
Location: UK - in the middlish (mostly).
Post: #3
Thanks, Dushmaniac. At least that saves me some futile searching... I'll try a different way to get browser et al working, then, unless the Executor plugin catches up quickly!
find quote
Termo Offline
Junior Member
Posts: 19
Joined: Dec 2009
Reputation: 0
Post: #4
All of the danish addons has the same problem Sad

http://forum.xbmc.org/showthread.php?tid=82238
find quote
Prof Yaffle Offline
Donor
Posts: 1,118
Joined: Mar 2011
Reputation: 25
Location: UK - in the middlish (mostly).
Post: #5
I suspect it may be a widespread implication of XBMC's Python updates. I've tried Executor (fails), Advanced Launcher (fails) and Launcher (complains a lot, but mostly works most of the time).

Ah, well, maybe it's time to clear out some of the older addons by finding out which ones are still maintained!
find quote
opdenkamp Offline
Team-XBMC PVR Developer
Posts: 2,221
Joined: Feb 2009
Reputation: 29
Location: Heerlen, The Netherlands
Post: #6
our stable release (dharma) is still using the old python, so there's probably nothing wrong with those addons.

opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
find quote
Prof Yaffle Offline
Donor
Posts: 1,118
Joined: Mar 2011
Reputation: 25
Location: UK - in the middlish (mostly).
Post: #7
Maybe not, but it sounds like there will be soon enough when the new Python version code drips down. I'm sure these addons aren't alone, either!

Forewarning, that's all.
find quote
sphere Offline
Team-Kodi Member
Posts: 1,204
Joined: Jul 2009
Reputation: 50
Location: Germany
Post: #8
This error has nothing to do with the python version.
It is related to the recent "os.getcwd()" changes in master.

Addons should not use "os.getcwd()" to get their addon id - the ID has to be hardcoded.

To fix this error search for "os.getcwd()" and replace it by the addon id.
To fix the addon from your Logfile go to Line 4 of the file "/home/xbmc/.xbmc/addons/plugin.program.executor/default.py" and replace:
Code:
wrong:  Addon = xbmcaddon.Addon(id=os.path.basename(os.getcwd()))
right:  Addon = xbmcaddon.Addon(id='plugin.program.executor')
regards,
sphere

My GitHub. My Add-ons:
[Image: IOoywq0.jpg]
find quote
Prof Yaffle Offline
Donor
Posts: 1,118
Joined: Mar 2011
Reputation: 25
Location: UK - in the middlish (mostly).
Post: #9
Thanks, Sphere. That's mostly cured it - at least, enough to use it again - so many thanks there.

For reference for anyone else who stumbles in here, I actually had to change the following file and not default.py because of various include directives:

Code:
~/.xbmc/addons/plugin.program.executor/resources/lib/executor.py

The plugin still throws an error, but does now work. Interestingly, I get the same error with the Launcher plugin as well, and that also works despite the complaints. XBMC reports:

Code:
Error
Script failed! : plugin.program.executor

And writes this to the log file:

Code:
17:55:25 T:2562145136 M:2714238976   DEBUG: Process - Entering source directory /home/xbmc/.xbmc/addons/plugin.program.executor
17:55:25 T:2958031728 M:2714112000   DEBUG: WaitOnScriptResult- plugin returned successfully
17:55:25 T:2562145136 M:2714112000   ERROR: Failed to close the script file /home/xbmc/.xbmc/addons/plugin.program.executor/default.py
17:55:25 T:2562145136 M:2714112000    INFO: -->Python script returned the following error<--
17:55:25 T:2562145136 M:2714112000   ERROR: Error Type: <type 'exceptions.SystemError'>
17:55:25 T:2562145136 M:2714112000   ERROR: Error Contents: null argument to internal routine
17:55:25 T:2562145136 M:2714112000    INFO: -->End of Python script error report<--
17:55:25 T:2562145136 M:2714112000    INFO: Python script stopped

I suppose that could be related to Python versions or similar. There's no immediate explanation for the Failed to close the script file error that I can see, so I suspect that's entirely misleading. It's more likely the null argument to internal routine error, and maybe that's a default that's no longer valid or something similar.

I'm interested now so I'll start digging to see if I can follow the logic - but I'll probably lose interest soon enough - or, more accurately, have my interest lost for me when my wife wants the television back Tongue

Thanks for the help, all.
find quote