[mythtv-users] python
Mike Perkins
mikep at randomtraveller.org.uk
Wed Feb 25 09:32:39 UTC 2015
On 25/02/15 02:42, James Linder wrote:
>
>> On 25 Feb 2015, at 4:53 am, mythtv-users-request at mythtv.org wrote:
>>
>>>>> 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
>>>>> _______________________________________________
>>
>>>> The error probably means it's missing a variable.
>>>> The last line in /_conn_mysqldb.py is an error handler.
>>>> Line 883 in mythburn.py is the execution of an sql statment. My guess
>>>> is configHostname is invalid, so look at ~/.mythtv/config.xml for your
>>>> hostname definition.
>>
>>
>>>> Tot mails,
>>>> Hika mailto:hikavdh at gmail.com
>>
>>> Looked a bit further:
>>> configHostname = DB.gethostname()
>>> So maybe an invalid hostname in your database
>>
>>> Tot mails,
>>> Hika Alina Maria van den Hoven mailto:hikavdh at gmail.com
>>
>> Just before the exception it logged the query that gave the error.
>> self.log_query(query, args)
>> So check the log.
>
> Hika thanks for the help, I’m out of my depth with python …
>
> Changing the <LocalHostName> results in a new setup for each name (dur!!)
> This all looks ok for the DB
>
> <PingHost>1</PingHost>
> <Host>192.168.5.35</Host>
> <UserName>mythtv</UserName>
> <Password>mythtv</Password>
> <DatabaseName>mythconverg</DatabaseName>
> <Port>3306</Port>
>
(snip)
>
That isn't a hostname, it is an IP address. Whatever you put in that string will
be used by the backend to generate a profile for the frontend in question.
The usual hostname will be whatever you named the machine when you installed the
Operating System. Very occasionally this won't be suitable for use by mythtv so
the 'LocalHostName' can be used to override it.
$ hostname
skywalker
--
Mike Perkins
More information about the mythtv-users
mailing list