Gentoo XBMC plugin issue
#1
No matter what plugin I try to run (SVN Repo Installer, CBS, Youtube, etc), it gives an error.

The error always has to do with a missing module (ie: os, urllib2, etc).

This modules are present as part of my system python module path. From what I have been told, XBMC uses its own pre-packaged version of Python and that it doesn't use the system module path. That being said, how do I resolve these module issues.
Reply
#2
I am also getting this problem.

I am running Gentoo/AMD64.

I have tried debugging the issue some, it appears that the file python24.zlib is not in the Python PATH, so I made a sym-link from python24.zlib -> python24.zip, which is in the Python PATH. This gave me an error about zlib and it can't decompress the file. I then unzipped the python24.zlib file into a path that was in the Python PATH, but I now got an error about not being able to import "struct" module. I noticed some changes in the SVN log related to the zlib->zip rename, perhaps someone else can comment on what might be going wrong here?
Reply
#3
Debug log.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
I was able to get around this (sort of). What I found is that the python24.zip file was missing from /usr/share/xbmc/system/python. I had someone on IRC DCC me their file and everything was working great.

I recently updated my XBMC today with the latest in SVN and now I am getting this error:

21:50:36 T:2977954704 M:1733472256 ERROR: Unable to load /home/cyrus/.xbmc/temp/time.so, reason: /home/cyrus/.xbmc/temp/time.so: invalid ELF header
21:50:36 T:2977954704 M:1733472256 ERROR: xbp_dlopen failed to load /usr/share/xbmc/system/python/python24.zip/time.so
21:50:36 T:2977954704 M:1733472256 NOTICE: Traceback (most recent call last):
21:50:36 T:2977954704 M:1733345280 NOTICE: File "<string>", line 1, in ?
21:50:36 T:2977954704 M:1733345280 NOTICE: File "/usr/share/xbmc/system/python/python24.zip/threading.py", line 11, in ?
21:50:36 T:2977954704 M:1733345280 NOTICE:
21:50:36 T:2977954704 M:1733345280 NOTICE: from time import time as _time, sleep as _sleep
21:50:36 T:2977954704 M:1733345280 NOTICE: ImportError
21:50:36 T:2977954704 M:1733345280 NOTICE: :
21:50:36 T:2977954704 M:1733345280 NOTICE: unknown dlopen() error
21:50:36 T:2977954704 M:1733345280 NOTICE:

I checked the python24.zip file and it contains a time.so file. Maybe I need a more recent version of that zip file? I think the Gentoo ebuild is broken since it doesn't appear to supply it.
Reply
#5
Quote:Any files may be present in the zip archive, but only files
*.py and *.py[co] are available for import. Zip import of
dynamic modules (*.pyd, *.so) is disallowed.

.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
Nuka1195 Wrote:.

Not sure what you mean. The plugin I am trying to run is CBS, ESPN, etc. These are standard plugins that worked before. Plus, it seems to extract the time.so from the zip file as it appears in my .xbmc/temp directory.
Reply
#7
Looking through the eBuild process, I don't see where they mess with the Python scripts at all (except to disable termcap libs), is there something that has changed in the build process recently that would require a special build-step? I can't find anything on the Wiki or in the documentation.
Reply
#8
Here is what I have found (this happens with all the standard plugins, CBS, Apple Trailers, ESPN, etc - not some homebrew plugin I am working on).

Lets take the example for the debug I posted above. It complains that time.so has an invalid ELF header. What I have found is that in the .xbmc/temp directory, the libraries, as needed are extracted. So, for instance, the CBS plugin requires time.so and that file appears in .xbmc/temp. Now, if I run the file command to identify the type of file time.so is, it just returns data. If I manually extract the time.so file from python24.zip myself and run the file command against it, it returns

time.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped


So somethine is happening while trying to extract that file from the archive. This happens with any and all libraries (*.so) required by plugins.

I know someone above stated that XBMC does not support .so files, but I find that hard to believe since all the standard video plugins use them.
Reply
#9
jimbo333, please repost your debug log properly (ie. use a pastesite).
Reply
#10
Sorry for the improper post before, here is a link to the logs:

Log running script as build from portage: http://pastesite.com/6571

Symlink from python24.zlib to python24.zip: http://pastesite.com/6572

Manually extract python24.zlib: http://pastesite.com/6573
Reply
#11
^^, what you did is incorrect. The .zlib file is not the same as the .zip file.
Reply
#12
Do you know what the differences are?? I am still trying to figure out how all this works, so I am probably wrong all over the place. The contents of the zlib file appear the same as the zip file, they are both ZIP files with python objects included?? The zlib file would never be included in the Python as indicated in the logs, it is not included in the python path. Although I think the issue might be that 'zip' should be listed as a dependency of xbmc, which is why we didn't get a generated python24.zip, I will rebuild tonight after emerging zip and see if the issue resolves..
Reply
#13
jimbo333 Wrote:Do you know what the differences are?? I am still trying to figure out how all this works, so I am probably wrong all over the place. The contents of the zlib file appear the same as the zip file, they are both ZIP files with python objects included?? The zlib file would never be included in the Python as indicated in the logs, it is not included in the python path. Although I think the issue might be that 'zip' should be listed as a dependency of xbmc, which is why we didn't get a generated python24.zip, I will rebuild tonight after emerging zip and see if the issue resolves..

I don't know what the exact differences are, but the contents are totally different. One file (zlib) is 1.4 megs while the zip is 30+ megs.

I found out what my issue was, supposedly the latest SVN code fixes this problem (my problem, not your jimbo333 - for you, you just need someone to send you ther python24.zip file)
Reply
#14
Thumbs Up 
My issue is fixed now, I suspect you were seeing the same issue, the "zip" program is not listed as a dependency for the package, but is required to build the python24.zip file, after emerging zip, then xbmc again my issue was resolved, I now have a generated python24.zip. I have also posted a bug-report with Gentoo ebuild.
Reply

Logout Mark Read Team Forum Stats Members Help
Gentoo XBMC plugin issue1