Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

mythcal error with 0.22-fixes

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


dlknight at sdf

Nov 21, 2009, 4:06 AM

Post #1 of 9 (1094 views)
Permalink
mythcal error with 0.22-fixes

I've pulled down the latest version of mythcal from google code
(http://code.google.com/p/mythcal/), installed the pytz and python-gdata
prerequisites but get the following error when running mythcal --dry-run:

Traceback (most recent call last):
File "./mythcal", line 106, in <module>
recordings = get_recordings_from_backend()
File "./mythcal", line 98, in get_recordings_from_backend
if mythtv.isRecording(recorder):
File "usr/lib/python2.5/site-packages/MythTV/MythTV.py", line 295, in
isRecording
TypeError: sequence item 0: expected string, int found

Any ideas?

Many thanks

Dave K.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 21, 2009, 6:17 AM

Post #2 of 9 (1059 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

On 11/21/2009 07:06 AM, David Knight wrote:
> I've pulled down the latest version of mythcal from google code
> (http://code.google.com/p/mythcal/), installed the pytz and python-gdata
> prerequisites but get the following error when running mythcal --dry-run:
>
> Traceback (most recent call last):
> File "./mythcal", line 106, in <module>
> recordings = get_recordings_from_backend()
> File "./mythcal", line 98, in get_recordings_from_backend
> if mythtv.isRecording(recorder):
> File "usr/lib/python2.5/site-packages/MythTV/MythTV.py", line 295, in
> isRecording
> TypeError: sequence item 0: expected string, int found
>
> Any ideas?
>
> Many thanks

Someone needs to update the program to support the new protocol.

Or, better, update it to use the Python bindings so that this will never
happen again (as they're always updated to support the new protocol).

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


dlknight at sdf

Nov 21, 2009, 7:48 AM

Post #3 of 9 (1056 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

On Sat, November 21, 2009 2:17 pm, Michael T. Dean wrote:
> On 11/21/2009 07:06 AM, David Knight wrote:
>> I've pulled down the latest version of mythcal from google code
>> (http://code.google.com/p/mythcal/), installed the pytz and python-gdata
>> prerequisites but get the following error when running mythcal
>> --dry-run:
>>
>> Traceback (most recent call last):
>> File "./mythcal", line 106, in <module>
>> recordings = get_recordings_from_backend()
>> File "./mythcal", line 98, in get_recordings_from_backend
>> if mythtv.isRecording(recorder):
>> File "usr/lib/python2.5/site-packages/MythTV/MythTV.py", line 295, in
>> isRecording
>> TypeError: sequence item 0: expected string, int found
>>
>> Any ideas?
>>
>> Many thanks
>
> Someone needs to update the program to support the new protocol.
>
> Or, better, update it to use the Python bindings so that this will never
> happen again (as they're always updated to support the new protocol).
>
> Mike
>
>

Cheers, any pointers on what needs to be updated? mythcal or MythTV.py?

Dave K

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


memoryguy at gmail

Nov 21, 2009, 9:30 AM

Post #4 of 9 (1047 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

On Sat, Nov 21, 2009 at 10:48, David Knight <dlknight [at] sdf> wrote:
>
> Cheers, any pointers on what needs to be updated? mythcal or MythTV.py?

I interpret Mike's response to mean that mythcal would need to be
updated.... to call methods defined in MythTV.py, I'd assume.

Unfortunately, I know even less about how to use the MythTV binding
functions than I do about Python (always meant to learn Python, but
never had the time). So I'm currently running into the same error you
are, and stuck on how to fix it :(

But I should focus on getting the rest of the system working first, I
suppose... :)

aaron
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


finlay at moeraki

Nov 21, 2009, 11:26 AM

Post #5 of 9 (1034 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

David Knight wrote:
> I've pulled down the latest version of mythcal from google code
> (http://code.google.com/p/mythcal/), installed the pytz and python-gdata
> prerequisites but get the following error when running mythcal --dry-run:
>
> Traceback (most recent call last):
> File "./mythcal", line 106, in <module>
> recordings = get_recordings_from_backend()
> File "./mythcal", line 98, in get_recordings_from_backend
> if mythtv.isRecording(recorder):
> File "usr/lib/python2.5/site-packages/MythTV/MythTV.py", line 295, in
> isRecording
> TypeError: sequence item 0: expected string, int found
>
>
Looks like the MythTV API was changed when the bindings were updated.
isRecording will not accept an int anymore so mythcal will have to pass
a string or MythTV would have to be changed to support the previous
API. Looks like the getCurrentRecording binding has been changed in this
fashion as well.

John
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 21, 2009, 5:15 PM

Post #6 of 9 (1016 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

On 11/21/2009 12:30 PM, aaron wrote:
> On Sat, Nov 21, 2009 at 10:48, David Knight wrote:
>
>> Cheers, any pointers on what needs to be updated? mythcal or MythTV.py?
>>
> I interpret Mike's response to mean that mythcal would need to be
> updated.... to call methods defined in MythTV.py, I'd assume.
>
> Unfortunately, I know even less about how to use the MythTV binding
> functions than I do about Python (always meant to learn Python, but
> never had the time). So I'm currently running into the same error you
> are, and stuck on how to fix it :(
>
> But I should focus on getting the rest of the system working first, I
> suppose... :)
>

Yes, there are 2 options.

Either update the mythcal script to include code to speak the 0.22
protocol--and update mythcal /every/ time the protocol changes. This
code that speaks the 0.22 protocol would do the exact same thing that
the code in the Python bindings does.

Therefore, the or is to change the mythcal script so that--rather than
trying to speak the 0.22 protocol directly (and updating the mythcal
script with every protocol change)--the mythcal script instead uses the
MythTV Python bindings, which already have the code that speaks the 0.22
protocol /and/ are updated every time the protocol is updated.

Mike

(Can you guess which is my preference?)
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 21, 2009, 5:29 PM

Post #7 of 9 (1020 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

On 11/21/2009 02:26 PM, John Finlay wrote:
> David Knight wrote:
>> I've pulled down the latest version of mythcal from google code
>> (http://code.google.com/p/mythcal/), installed the pytz and python-gdata
>> prerequisites but get the following error when running mythcal
>> --dry-run:
>>
>> Traceback (most recent call last):
>> File "./mythcal", line 106, in <module>
>> recordings = get_recordings_from_backend()
>> File "./mythcal", line 98, in get_recordings_from_backend
>> if mythtv.isRecording(recorder):
>> File "usr/lib/python2.5/site-packages/MythTV/MythTV.py", line 295, in
>> isRecording
>> TypeError: sequence item 0: expected string, int found
> Looks like the MythTV API was changed when the bindings were updated.
> isRecording will not accept an int anymore so mythcal will have to
> pass a string or MythTV would have to be changed to support the
> previous API. Looks like the getCurrentRecording binding has been
> changed in this fashion as well.

Ah, though now I see you're pointing out that it does use the MythTV
Python bindings. That means it just needs updated for the new API
version--which should be much easier than updating for a new protocol
version.

Didn't notice the MythTV/MythTV.py in there. Sorry for the noise.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


finlay at moeraki

Nov 22, 2009, 11:05 AM

Post #8 of 9 (981 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

Michael T. Dean wrote:
> On 11/21/2009 02:26 PM, John Finlay wrote:
>> David Knight wrote:
>>> I've pulled down the latest version of mythcal from google code
>>> (http://code.google.com/p/mythcal/), installed the pytz and
>>> python-gdata
>>> prerequisites but get the following error when running mythcal
>>> --dry-run:
>>>
>>> Traceback (most recent call last):
>>> File "./mythcal", line 106, in <module>
>>> recordings = get_recordings_from_backend()
>>> File "./mythcal", line 98, in get_recordings_from_backend
>>> if mythtv.isRecording(recorder):
>>> File "usr/lib/python2.5/site-packages/MythTV/MythTV.py", line 295, in
>>> isRecording
>>> TypeError: sequence item 0: expected string, int found
>> Looks like the MythTV API was changed when the bindings were updated.
>> isRecording will not accept an int anymore so mythcal will have to
>> pass a string or MythTV would have to be changed to support the
>> previous API. Looks like the getCurrentRecording binding has been
>> changed in this fashion as well.
>
> Ah, though now I see you're pointing out that it does use the MythTV
> Python bindings. That means it just needs updated for the new API
> version--which should be much easier than updating for a new protocol
> version.
>
I would also file a bug report against MythTV.py for the change in API
since it's possible the API change was unintentional. This change is
likely to cause breakage in other apps.

John
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 22, 2009, 4:15 PM

Post #9 of 9 (969 views)
Permalink
Re: mythcal error with 0.22-fixes [In reply to]

On 11/22/2009 02:05 PM, John Finlay wrote:
> Michael T. Dean wrote:
>> On 11/21/2009 02:26 PM, John Finlay wrote:
>>> David Knight wrote:
>>>> I've pulled down the latest version of mythcal from google code
>>>> (http://code.google.com/p/mythcal/), installed the pytz and
>>>> python-gdata
>>>> prerequisites but get the following error when running mythcal
>>>> --dry-run:
>>>>
>>>> Traceback (most recent call last):
>>>> File "./mythcal", line 106, in <module>
>>>> recordings = get_recordings_from_backend()
>>>> File "./mythcal", line 98, in get_recordings_from_backend
>>>> if mythtv.isRecording(recorder):
>>>> File "usr/lib/python2.5/site-packages/MythTV/MythTV.py", line
>>>> 295, in
>>>> isRecording
>>>> TypeError: sequence item 0: expected string, int found
>>> Looks like the MythTV API was changed when the bindings were
>>> updated. isRecording will not accept an int anymore so mythcal will
>>> have to pass a string or MythTV would have to be changed to support
>>> the previous API. Looks like the getCurrentRecording binding has
>>> been changed in this fashion as well.
>>
>> Ah, though now I see you're pointing out that it does use the MythTV
>> Python bindings. That means it just needs updated for the new API
>> version--which should be much easier than updating for a new protocol
>> version.
>>
> I would also file a bug report against MythTV.py for the change in API
> since it's possible the API change was unintentional. This change is
> likely to cause breakage in other apps.

There were many intentional API changes in the MythTV Python bindings
with the 0.22 release of the MythTV Python bindings. They went from
mostly useless to better than the Perl bindings because of such API changes.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.