I am having a problem working with a python program I found in the pages of the MythTV wiki. Python isn't really one of mine but usually have been able to muddle through other programs since I am familiar wth the basic core language and can usually work something out. However, this program uses MythTV bindings/APIs/something and I don't know where to find documentation. Probably mostly because I don't know exactly what I'm looking for.The line that is giving me grief is:
Code:
db = MythDB()
~~~~~~~~~~~~~~~~~~~~~~ <====somecode
rec = Recorded((chanid, utcstarttime), db=db);
I think the function (my word) is introduced by the line near the beginning of the program:
Code:
from MythTV import Job, Recorded, System, MythDB, findfile, MythError, MythLog, datetime
The program is transcode-h264-v2.py found in the MyhTV wiki. The error I get is:
Code:
chanid "2279"
utcstarttime "2017-10-22 00:00:00-05:00"
starttime "20171022000000"
tzoffset "0"
Traceback (most recent call last): :oops:
File "./transcode-h264-v2.py", line 686, in <module>
main()
File "./transcode-h264-v2.py", line 680, in main
runjob(chanid=opts.chanid, starttime=opts.starttime, tzoffset=opts.tzoffset)
File "./transcode-h264-v2.py", line 177, in runjob
rec = Recorded((chanid, utcstarttime), db=db);
File "/usr/lib/python2.7/site-packages/MythTV/dataheap.py", line 342, in __init__
DBDataWrite.__init__(self, data, db)
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 318, in __init__
DBData.__init__(self, data, db)
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 180, in __init__
self._pull()
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 388, in _pull
DBData._pull(self)
File "/usr/lib/python2.7/site-packages/MythTV/database.py", line 204, in _pull
raise MythError('DBData() could not read from database')
MythTV.exceptions.MythError: DBData() could not read from database
I need someone to tell me what I am dealing with 'from MythTV import' and where the dox are. I would like to troubleshoot this myself but find I am in way over my head at the moment so I am looking for a helping hand to reach down and pull my head above the water.
sparks
![Confused :?](./images/smilies/icon_confused.gif)