[mythtv-commits] Ticket #8051: Mirobridge fails with NameError: global name 'struct' is not defined
MythTV
mythtv at cvs.mythtv.org
Tue Feb 9 11:08:20 UTC 2010
#8051: Mirobridge fails with NameError: global name 'struct' is not defined
----------------------------------------+-----------------------------------
Reporter: rune.evjen@… | Owner: mdean
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: Contributed Scripts & Apps | Version: head
Severity: medium | Mlocked: 0
----------------------------------------+-----------------------------------
When running Mirobridge using trunk version trunk23484, I get the
following error:
Python traceback:
{{{
Traceback (most recent call last):
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 2651, in <module>
main()
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 2634, in main
if not updateMythVideo(watched):
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 1980, in
updateMythVideo
tmp_array = createVideometadataRecord(item)
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 1501, in
createVideometadataRecord
videometadata[u'hash'] = hashFile(videometadata[u'filename'])
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 568, in hashFile
bytesize = struct.calcsize(longlongformat)
NameError: global name 'struct' is not defined
}}}
It seems that maybe the struct module is not imported, I added "import
struct" to the python script then I get another error:
{{{
Traceback (most recent call last):
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 2652, in <module>
main()
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 2635, in main
if not updateMythVideo(watched):
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 1981, in
updateMythVideo
tmp_array = createVideometadataRecord(item)
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 1502, in
createVideometadataRecord
videometadata[u'hash'] = hashFile(videometadata[u'filename'])
File "/usr/share/doc/mythtv-
backend/contrib/imports/mirobridge/mirobridge.py", line 570, in hashFile
f = open(name, "rb")
NameError: global name 'name' is not defined
}}}
Download and import of videos as recordings works fine, but I suspect that
they are not removed from the database after they have been watched based
on the above error.
Mirobridge is running as a cron job using this command:
{{{
env `dbus-launch` sh -c 'trap "kill $DBUS_SESSION_BUS_PID" EXIT;
/usr/share/doc/mythtv-backend/contrib/imports/mirobridge/mirobridge.py -V'
> "/tmp/mirobridge.log" 2>&1
}}}
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/8051>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list