kodi-svtplay / xbmc-svtplay

Unofficial addon for watching SVT Play on Kodi
GNU General Public License v3.0
66 stars 34 forks source link

No module named CommonFunctions #59

Closed MrShark closed 11 years ago

MrShark commented 11 years ago

I'm having trouble running svtplay, giving the following in the log:

12:28:26 T:2892102512  NOTICE: -->Python Interpreter Initialized<--
12:28:26 T:2892102512   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named CommonFunctions
                                            Traceback (most recent call last):
                                              File "/home/jens/.xbmc/addons/plugin.video.svtplay/default.py", line 12, in <module>
                                                import CommonFunctions
                                            ImportError: No module named CommonFunctions
                                            -->End of Python script error report<--
12:28:26 T:2858531696   ERROR: GetDirectory - Error getting plugin://plugin.video.svtplay

I found issue 32, and tried youtube, which gave the same type of error.

CommonFunctions.py is located in addons/script.module.parsedom/lib/ and when I removed addons/script.module.parsedom/ and reinstalled youtube and svtplay it got recreated.

I then added:

import sys
open("/tmp/xmbc.log", "w").write(str(sys.path))

to the svtplay plugin which told me that the path was as follows (slightly reformatted):

['/home/jens/.xbmc/addons/plugin.video.svtplay',
'/home/jens/.xbmc/addons/script.module.xbmcswift/lib',
'/usr/share/xbmc/addons/script.module.simplejson/lib',
'/home/jens/.xbmc/addons/weather.wunderground/resources/lib/wunderground',
'/home/jens/.xbmc/addons/script.module.beautifulsoup/lib',
'/usr/share/xbmc/addons/script.module.pil/lib',
'/home/jens/.xbmc/addons/script.common.plugin.cache/lib',
'/home/jens/.xbmc/addons/script.module.simple.downloader/lib',
'/home/jens/.xbmc/addons/script.module.buggalo/lib',
'/home/jens/.xbmc/addons/script.module.xbmcswift2/lib',
'/home/jens/.xbmc/addons/script.module.elementtree/lib',
'/home/jens/.xbmc/addons/script.web.viewer/lib',
'/usr/share/xbmc/addons/script.module.pysqlite/lib',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
'/usr/lib/python2.7/dist-packages/ubuntuone-couch',
'/usr/lib/python2.7/dist-packages/ubuntuone-installer',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',
'']

i.e the parsedom path is not included. I then copied CommonFunctions to the addons/plugin.video.svtplay which made it work. Not fully sure why this happens but it started happening while using frodo rc1 and persisted into the released frodo, both versions from team-xbmc ppa on launchpad.

linqcan commented 11 years ago

I am a bit confused. Isn't this an issue report for XBMC or parsedom? This add-on merely specifies what is required, and XBMC will then install those required add-ons. Hence, the add-on has nothing to do with the installation of parsedom on any platform.

Would recommend you to try and install parsedom through a zip file and see if the error still exists. And in any case I think you should file a bug report in the parsedom thread or for the XBMC project (search the forum first).

Sources: http://wiki.xbmc.org/index.php?title=Addon.xml#The_.3Crequires.3E_element http://mirrors.xbmc.org/addons/frodo/script.module.parsedom/ http://forum.xbmc.org/showthread.php?tid=116498

MrShark commented 11 years ago

Well perhaps :-)

But the problem appeared in conjunction with svtplay, and you have a bug reporting system, which I coulden't find for parsedom. Hopefully this bug report can get enough googlefu to help the next sufferer. I'll see if I find somewhere to file the bug against parsedom later.

linqcan commented 11 years ago

Yeah, I see. I sounds like your installation might be broken somehow? Assuming this since I haven't seen any reports about this before. Maybe you can try and reinstall XBMC and see if the error still exists?

Bug reporting for parsedom are done using the forum thread I linked to in my previous post.

Hope you find a solution quickly so that you can fully enjoy XBMC!