Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The vital stats:
Mythbuntu 10.10 (maverick)
XBMC 11 -- from team-xbmc maverick ppa
Mythtv 0.23.1+fix (the standard version for mythbuntu 10.10)
Mythbox version 1.1.0

OK, so, I was happily going along running XBMC 10.1 on my HTPC setup, and I saw everyone was all excited about XBMC 11, and it was available from the PPA.

Now, when I go into mythbox and select a recording, it shows me the following error message box:

Error: oninit

cannot import name decodeLongLong

This only seems to affect its ability to show a thumbnail picture for the recording. When I start playing the recording, everything pretty much goes fine.

What does this error message mean? Is there any way I can fix it? Is there a library I am missing or something?

Edit: I've posted a few more details in the comments here.

share|improve this question
    
I'm also wondering if anyone else is seeing the same problem. Google doesn't come up with anything except my question :( –  Josh Mar 25 '12 at 10:47
    
Any reason you are running such an old version of Mythbuntu? –  Tshepang Mar 25 '12 at 11:42
    
Because I set it up with 10.10 and it "just worked". Not much incentive to upgrade the distro on a dedicated HTPC. (I should have learned the same lesson about not upgrading XBMC, but cest la vie :/) –  Josh Mar 25 '12 at 12:29
    
Further information: If I use the "rollback" feature to pin MythBox at 1.0.4 , then I do not have this issue. (But I can't use 1.0.4 for other reasons) –  Josh Mar 25 '12 at 13:06
    
Further further investigation: I guess I never looked too closely at the "program info" section before, but there is more stuff blank. And I dug into the python and it seems to be having a problem when it is determining the file size. I'm afraid to try and manually fix it, because my knowledge of python is minimal... –  Josh Mar 26 '12 at 0:02

3 Answers 3

up vote 2 down vote accepted
+50

Mythbox has been written in Python, cannot import name is a typical Python exception.

This has nothing to do with timezone as others tend to belief, but rather because Python is trying to import something that doesn't exist or at least is inaccessible.

decodeLongLong is a function we can find in the MythTV API; note though that this function is written in C++ and thus is not accessible from Python, thus there must be done something to get this function to be available in Python. Exactly, C++ translation units can be compiled and then be used by Python code.

Exactly, the Python wrapper to call the C++ functions doesn't seem to contain a decodeLongLong function at the moment. You will have to await response to issue 203; though you could try to install update MythTV because this might be a relatively new function. the API mentions 0.25-pre on its front page. So if you are comfortable running bleeding edge code, you could try to upgrade from 0.23.1 to 0.25-pre; if not, go for the latest 0.24 version and see if that works.

Doing this would update the Python wrapper Mythbox is using, and hopefully place the function in there. You might need to reinstall Mythbox if this happens dynamically, the source code doesn't show any trace of this but it might be that something is done through the package manager. Better to be safe than sorry.

You don't need to upgrade anything else...

share|improve this answer
1  
I will try upgrading mythtv to 0.24 and report back. Maybe the MythBox developer didn't believe anyone was still running the older version. –  Josh Mar 28 '12 at 12:21
1  
Just upgraded to 0.24 using the "mythbuntu-repos" deb from mythbuntu.org/repos , and so far so good. At least good enough to mark this as Best Answer. –  Josh Apr 3 '12 at 0:12

(A non-user of XBMC trying to help.)

You have reported this bug as Issue 203 on the mythbox forum.

Puzzlingly, I find traces of a similar bug in the mythcal forums going back to :

Issue 6: Timezone conversion fails with current trunk (will become 0.24)
Issue 7: Patch for /trunk/mythcal to fix "cannot import name MythTV" error
Issue 8: Need libmyth-python package for Fedora

This problem seems to be related to the timezone and may have been activated by even something as banal as daylight saving time change.

As this problem is marked as resolved on the mythcal forums (which may or may not have a bearing on mythbox), it might be worthwhile updating all versions of all software to the latest, going up to trunk version if required.

If the bug still exists even in the trunk version, the mythbox forums is where you will most likely get it fixed (unless a mythbox developer will answer here).

share|improve this answer

I am using XBMC 11.0 on Windows, with MythBox 1.1.0. I just needed to modify a single line in addons\script.mythbox\resources\src\mythbox\mythtv\protocol.py:

Changed line 91 from

return decodeLongLong(int(program.getField('fs_low')), int(program.getField('fs_high'))) / 1024.0

to

return self.decodeLongLong(int(program.getField('fs_low')), int(program.getField('fs_high'))) / 1024.0

as the decodeLongLong is re-implemented in this class anyways.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.