sloflin72 / mythbox

Automatically exported from code.google.com/p/mythbox
GNU General Public License v2.0
0 stars 1 forks source link

Exception: Invalid literal for int(); #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Ubuntu 9.10
XBMC 9.04
Latest version of MythBox (1558)

When I attempt to watch a recording, I get a message box saying:

Exception: Invalid litera for int();
Function: <function onClick at 0x9bc1024>

Could it have to do with the fact that I run a standard MythTV perl script
(myth_friendly_rename.pl) as a cronjob which renames the 1239712312.mpg's
to friendly "Name_of_Show.mpg"?  It's never affected any of the other
frontends I've used.

Btw -- this script looks amazing.  My wife owes you! :)

Here is the log file entry;

21:34:00 T:2890914672 M:468238336  NOTICE: ERROR | mythtv.core | util.py |
MainThread | Line 400 | CATCHALL_UI: Caught exception invalid literal for
int():  on method <function onClick at 0x9bc1024>
Traceback (most recent call last):
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/util.py", line 398,
in catchall_ui
    return func(*args, **kw)
  File "<string>", line 1, in <lambda>
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/util.py", line 267,
in lirc_hack
    return func(*args, **kwargs)
  File "<string>", line 1, in <lambda>
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/ui.py", line 191, in
window_busy
    result = func(*args, **kwargs)
  File
"/home/matt/.xbmc/scripts/MythBox/resources/src/recordingdetails.py", line
174, in onClick
    self.dispatcher[source.getId()]()
  File
"/home/matt/.xbmc/scripts/MythBox/resources/src/recordingdetails.py", line
132, in play
    p.playRecording(self.program, player.NoOpCommercialSkipper(p,
self.program))
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/player.py", line 71,
in playRecording
    self.play(self.getFileUrl(), self._buildPlayList())
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/player.py", line
167, in _buildPlayList
    comms = self._program.getCommercials()
  File "<string>", line 1, in <lambda>
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/injected.py", line
76, in inject_conn
    result = func(*args, **kwargs)
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/injected.py", line
259, in getCommercials
    return super(InjectedRecordedProgram, self).getCommercials()
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/domain.py", line
796, in getCommercials
    self._commercials = self.conn().getCommercialBreaks(self)
  File "<string>", line 1, in <lambda>
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/util.py", line 351,
in timed
    result = func(*args, **kw)
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/mythtv.py", line
798, in getCommercialBreaks
    reply = self._sendRequest(self.cmdSock, [command])
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/mythtv.py", line
1086, in _sendRequest
    reply = self._readMsg(s)
  File "/home/matt/.xbmc/scripts/MythBox/resources/src/mythtv.py", line
1056, in _readMsg
    n = int(retMsg)
ValueError: invalid literal for int():

Original issue reported on code.google.com by m...@chevron.com on 11 Nov 2009 at 3:44

GoogleCodeExporter commented 9 years ago
From the stack trace, it looks like you're trying to play a recording w/o 
skipping
the commercials even though the recording is flagged for commercial skip 
detection. A
few questions:

1. Is this reproducible w/o fail every single time? 
2. Is it just this recording or do other recordings have the same result
3. What is the status of the commercial skip job? Not run yet, in progress, or 
completed?

It would also be helpful if you could attach the complete mythbox.log after 
setting
line 77 in mythbox_log.ini to 'level=DEBUG'. 

Thanks for the support! 

Original comment by semir.pa...@gmail.com on 11 Nov 2009 at 9:09

GoogleCodeExporter commented 9 years ago
1. Yes
2. Everything
3. It never changes from "Loading..."  (I never see how many commercials it 
detected)

Something's obviously wrong with the commercial check.  Even before I attempt 
to play
the video, when it tries to load the commercials my backend crashes.  I then 
restart
the backend, and trying to watch the video causes it to crash again (each time
MythBox throws its exception, my backend crashes).

You can find the xbmc.log attached.  (with level=DEBUG)

Thanks for looking into this!!

Original comment by m...@chevron.com on 12 Nov 2009 at 1:49

Attachments:

GoogleCodeExporter commented 9 years ago
The log file seems to indicate that your db may be "corrupt". The fact that a
frontend is causing your backend to segfault isn't exactly encouraging. Can you 
goto
the 'Settings' page -> 'Database Health' tab in MythWeb and see if all the 
tables are
listed as "OK". Regardless of the health of each table, click on the 'Repair 
Tables'
and 'Extended Check'  buttons and then restart the backend to see if that fixes 
your
problems.

Original comment by semir.pa...@gmail.com on 12 Nov 2009 at 3:23

GoogleCodeExporter commented 9 years ago
All database tables were [Ok], but I repaired anyway and restarted backend.

Same error :(

It must be something quirky with my backend/database -- I tried MythBox about 4
months ago and had the exact same error.  It's never happened with any other 
friend
ends (I've used the native MythTV client, XBMC's native MythTV protocol, the old
xbmcmythtv python frontend, probably 1-2 others).

I still wonder if it's because I have a cronjob running:
/usr/share/doc/mythtv-backend/contrib/mythrename.pl

to make the 1234623432.mpg's into nice Show_Name_Date.mpg

Should I just comment out the function that tries to count the commercial 
breaks?

Original comment by m...@chevron.com on 12 Nov 2009 at 5:15

GoogleCodeExporter commented 9 years ago
well, its worth turning off the cronjob for a few days and see if that makes a
difference. you can also try a newer build of mythbox (it is an attachment on 
issue
73 - http://code.google.com/p/mythbox/issues/detail?id=73) which includes some
optimizations to the protocol negotiation steps. definitely worth a try...

Original comment by semir.pa...@gmail.com on 13 Nov 2009 at 3:34

GoogleCodeExporter commented 9 years ago
Hmm.. Still no go :(  I turned off the friendly rename and also tried the newer 
MythBox.

On the show details screen the "Comm Breaks: " never changes from "Loading..." 
(and
the attempted load causes a backend crash)

Original comment by m...@chevron.com on 13 Nov 2009 at 3:20

GoogleCodeExporter commented 9 years ago
Finally made some progress..

I started playing with the MythTV Network Protocol and narrowed the issue down 
to the
fact that anytime "QUERY_COMMBREAK" is issued to my backend, it crashes right 
away.

I saw that MythBox was sending:
31      QUERY_COMMBREAK 1008 1258122600

Which caused an immediate crash.  The fix was to upgrade my backend from 0.21 to
0.21+fixes (Ubuntu Gutsy).

Unfortunately, even though QUERY_COMMBREAK no longer crashes the backend, it 
returns
0/null/-1 even though there ARE commercials detected.  So even though MythBox 
works,
it doesn't attempt to let me try Play+Skip, only Play.

This is frustrating because the native MythTV client skips commercials just 
fine :(

It's obviously not an issue with your code, it's my backend/database having a 
case of
the swine flu.  Next year I'm going to upgrade my server from Gutsy to 10.04 LTS
which will mean a MythTV backend upgrade to 0.22

(Would you recommend using MythBuntu to upgrade my Gutsy Mythbackend to 0.22?)

Original comment by m...@chevron.com on 13 Nov 2009 at 5:09

GoogleCodeExporter commented 9 years ago
Mythbunu seems like a pretty safe bet. I haven't used the "entire" distro 
myself, but
I do use the mythbuntu repos for my stable MythTV installation.

Original comment by semir.pa...@gmail.com on 22 Nov 2009 at 9:29

GoogleCodeExporter commented 9 years ago
I just rebuilt my backend from scratch, using the mythbuntu repos, latest 
0.22+fixes.
 And for some reason even though mythbackend successfully records *and* flags
commercials, Mythbox is still showing the recordings as having Comm Breaks: None

(but the native MythTV client sees and skips the commercials)

I'm guessing QUERY_COMMBREAK is still returning null.

Any ideas?

Original comment by m...@chevron.com on 6 Dec 2009 at 8:19