3

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.

Josh
  • 324
  • 2
  • 4
  • 19

3 Answers3

2

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...

0

(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).

harrymc
  • 498,455
0

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.