[mythtv-users] python

Hika van den Hoven hikavdh at gmail.com
Mon Mar 23 10:26:52 UTC 2015


Hoi Yianni,

Monday, March 23, 2015, 10:14:05 AM, you wrote:


>> Hi
>> if anybody has walked this road and has any advice then please …
>> I’m trying to build a dvd on my suse backend machine.
>> After finding a few python modules I got stuck. Clearly python cannot access the DB
>>
>> Traceback (most recent call last):
>> File "/usr/local/share/mythtv/mytharchive/scripts/mythburn.py", line 5298, in <module>
>> main()
>> File "/usr/local/share/mythtv/mytharchive/scripts/mythburn.py", line 5165, in main
>> defaultsettings = getDefaultParametersFromMythTVDB()
>> File "/usr/local/share/mythtv/mytharchive/scripts/mythburn.py", line 883, in getDefaultParametersFromMythTVDB
>> cursor.execute(sqlstatement, configHostname)
>> File "/usr/lib/python2.7/site-packages/MythTV/_conn_mysqldb.py", line 71, in execute
>> raise MythDBError(MythDBError.DB_RAW, e.args)
>> MythTV.exceptions.MythDBError: MySQL error: not all arguments converted during string formatting
>>
>> Thanks anyone
>> James

> Hi, James, 

> I am in the same suse boat as you with mythtv master installed.

> I came across your post when I was googling for "not all arguments... " + mythtv

> I investigated a bit further and in
> /usr/[local/]share/mythtv/mytharchive/scripts/mythburn.py

> I changed 
> line 849 from 
>  OR (hostname=%s AND value IN(

>  to

>  OR (hostname='storage' AND value IN(


> ('storage' is the host's name)

> and 
> line 883 from

>     cursor.execute(sqlstatement, configHostname)

> to 

>     cursor.execute(sqlstatement)

> With these changes the script executes manually:
> python /usr/share/mythtv/mytharchive/scripts/mythburn.py -j
> /tmp/config/mydata.xml -l /tmp/logs/aaprogress.log

> but chokes further down.

> I solved the latter by applying the patch in:
> https://code.mythtv.org/trac/ticket/12260
> and I just finished my first archiving successfully...


> I know it's not a proper solution but maybe a willing developer
> with a kind soul comes across this thread and decides to help...
>                                           
> _______________________________________________

It's as you said not a proper solution. I looked at configHostname and
all it does is calling DB.gethostname(). Could it be that it needs
changing to the new API?

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list