steeve / plugin.video.pulsar

Pulsar addon for XBMC/Kodi
http://forum.kodi.tv/showthread.php?tid=200957
Other
546 stars 351 forks source link

0.6.1 problems with Openelec x64 #148

Open tatowaki opened 9 years ago

tatowaki commented 9 years ago

After I upgraded to 0.6.1 I'm having problems with Pulsar in Openelec. First I had the "Please restart XBMC" error which I solved by deleting Pulsar both in addons and addon_data, then reinstalling; but after some time, Pulsar no longer works, not even using the "Launch" command to bring the main menu.

Looking at the log, I get:

17:08:19 T:139738661697408 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.video.pulsar/) 17:08:19 T:139738661697408 DEBUG: ParentPath = [plugin://plugin.video.pulsar/] 17:08:19 T:139738661697408 DEBUG: StartScript - calling plugin Pulsar('plugin://plugin.video.pulsar/','1','') 17:08:19 T:139738661697408 DEBUG: WaitOnScriptResult - waiting on the Pulsar (id=21) plugin... 17:08:19 T:139736123422464 NOTICE: Thread LanguageInvoker start, auto delete: false 17:08:19 T:139736123422464 INFO: initializing python engine. 17:08:19 T:139736123422464 DEBUG: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.pulsar/navigation.py): start processing 17:08:19 T:139738661697408 DEBUG: LIRC: Update - NEW at 44378:160 0 KEY_OK_UP devinput (KEY_OK_UP) 17:08:19 T:139736123422464 NOTICE: -->Python Interpreter Initialized<-- 17:08:19 T:139736123422464 DEBUG: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.pulsar/navigation.py): the source file to load is "/storage/.kodi/addons/plugin.video.pulsar/navigation.py" 17:08:19 T:139736123422464 DEBUG: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.pulsar/navigation.py): setting the Python path to /storage/.kodi/addons/plugin.video.pulsar:/usr/lib/python27.zip:/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/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/PIL:/usr/lib/python2.7/site-packages/gtk-2.0 17:08:19 T:139736123422464 DEBUG: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.pulsar/navigation.py): entering source directory /storage/.kodi/addons/plugin.video.pulsar 17:08:19 T:139736123422464 DEBUG: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.pulsar/navigation.py): instantiating addon using automatically obtained id of "plugin.video.pulsar" dependent on version 2.1.0 of the xbmc.python api 17:08:19 T:139736123422464 NOTICE: http://localhost:65251/ 17:08:19 T:139736123422464 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

I also discovered another problem related to Openelec: Pulsar fails trying to purge files having non-ASCII characteres such as spanish 'ñ' (Openelec only supports POSIX)

17:08:00 T:139736131815168 INFO: initializing python engine. 17:08:00 T:139736131815168 DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.pulsar/service.py): start processing 17:08:00 T:139738661697408 DEBUG: CGUIMediaWindow::GetDirectory (addons://disabled/) 17:08:00 T:139738661697408 DEBUG: ParentPath = [addons://disabled/] 17:08:00 T:139737591424768 NOTICE: Thread BackgroundLoader start, auto delete: false 17:08:01 T:139736626755328 DEBUG: GetImageHash - unable to stat url /usr/share/kodi/addons/pvr.demo/icon.png 17:08:01 T:139736131815168 NOTICE: -->Python Interpreter Initialized<-- 17:08:01 T:139736131815168 DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.pulsar/service.py): the source file to load is "/storage/.kodi/addons/plugin.video.pulsar/service.py" 17:08:01 T:139736131815168 DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.pulsar/service.py): setting the Python path to /storage/.kodi/addons/plugin.video.pulsar:/usr/lib/python27.zip:/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/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/PIL:/usr/lib/python2.7/site-packages/gtk-2.0 17:08:01 T:139736131815168 DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.pulsar/service.py): entering source directory /storage/.kodi/addons/plugin.video.pulsar 17:08:01 T:139736131815168 DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.pulsar/service.py): instantiating addon using automatically obtained id of "plugin.video.pulsar" dependent on version 2.1.0 of the xbmc.python api 17:08:01 T:139737591424768 DEBUG: Thread BackgroundLoader 139737591424768 terminating 17:08:01 T:139738661697408 DEBUG: LIRC: Update - NEW at 25578:160 0 KEY_OK_UP devinput (KEY_OK_UP) 17:08:01 T:139737591424768 NOTICE: [plugin.video.pulsar] pulsar: starting jsonrpc service 17:08:01 T:139736123422464 NOTICE: [plugin.video.pulsar] pulsard: starting pulsard 17:08:01 T:139736123422464 NOTICE: [plugin.video.pulsar] Deleting stale files set(['The Killing USA - Temporada 3 [HDTV][Cap.301][Espa\xc3\xb1ol Castellano]']) 17:08:01 T:139736123422464 NOTICE: Traceback (most recent call last): 17:08:01 T:139736123422464 NOTICE: File "/storage/.kodi/addons/plugin.video.pulsar/resources/site-packages/pulsar/daemon.py", line 129, in pulsard_thread 17:08:01 T:139736123422464 NOTICE: proc = start_pulsard(stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 17:08:01 T:139736123422464 NOTICE: File "/storage/.kodi/addons/plugin.video.pulsar/resources/site-packages/pulsar/daemon.py", line 100, in start_pulsard 17:08:01 T:139736123422464 NOTICE: pulsar_dir, pulsar_binary = get_pulsar_binary() 17:08:01 T:139736123422464 NOTICE: File "/storage/.kodi/addons/plugin.video.pulsar/resources/site-packages/pulsar/daemon.py", line 85, in get_pulsar_binary 17:08:01 T:139736123422464 NOTICE: path = os.path.join(dest_binarydir, file) 17:08:01 T:139736123422464 NOTICE: File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/posixpath.py", line 71, in join 17:08:01 T:139736123422464 NOTICE: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 51: ordinal not in range(128) 17:08:01 T:139736123422464 ERROR: Exception in thread Thread-2: Traceback (most recent call last): File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 504, in run File "/storage/.kodi/addons/plugin.video.pulsar/resources/site-packages/pulsar/daemon.py", line 129, in pulsard_thread proc = start_pulsard(stdout=subprocess.PIPE, stderr=subprocess.STDOUT) File "/storage/.kodi/addons/plugin.video.pulsar/resources/site-packages/pulsar/daemon.py", line 100, in start_pulsard pulsar_dir, pulsar_binary = get_pulsar_binary() File "/storage/.kodi/addons/plugin.video.pulsar/resources/site-packages/pulsar/daemon.py", line 85, in get_pulsar_binary path = os.path.join(dest_binarydir, file) File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/posixpath.py", line 71, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 51: ordinal not in range(128)

Solved it by adding .decode("utf-8") and .encode("utf-8") in some lines on daemon.py. I guess this is too specific to Openelec, so I won't put a patch file as you'll probably need to add some checked to make it universal. "latin1" is used in the current code...