View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Oct 24, 2017 10:23 am 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 104
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 :oops: :?


Top
 Profile  
 
PostPosted: Wed Oct 25, 2017 2:47 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
From the error, my guess would be that it isn't authenticating with the database correctly.

Have you tried running this under the same userID as the backend? If that didn't work, then I would check all the Config.xml files. There may be several on your system... They should all have correct DB userID/password. See https://www.mythtv.org/wiki/Config.xml for the various locations.

Cheers,

Allen

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
PostPosted: Wed Oct 25, 2017 3:47 pm 
Offline
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 104
Thanks for the reply. I checked my config.xml files and they all have proper credentials in them. One google hit suggested that it means no rows were selected. The debug print of the date/time has that UTC differential on the end. I keep thinking that it might be what is causing a problem.

I am really looking for the documentation on how to use the routine (function call 'Recorded'). Am I using a 'binding' or an 'API' or something else? None of the MythTV documentation I have looked at seems to look familiar with regards to this usage or document any explanation. There seems to be a lot that goes unstated for the novice.

s


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu