[mythtv] ttvdb on Fedora 26

David Hampton mythtv at dhampton.net
Wed Aug 30 01:32:33 UTC 2017


I'm having trouble with the new ttvdb script from master on my Fedora
26 development box.  When I run "./ttvdb.py --doctest" in the source
directory, half of the tests fail with the error message "TypeError:
unsupported operand type(s) for -: 'datetime.datetime' and 'int'". 
I've attached a sample traceback.


File "./ttvdb.py", line 544, in __main__
Failed example:
    main()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__[25]>", line 1, in <module>
        main()
      File "./ttvdb.py", line 2062, in main
        userkey=tvdb_account.account_identifier)
      File "/home/david/Projects/MythTv/mythtv-
master/mythtv/bindings/python/MythTV/ttvdb/tvdb_api.py", line 693, in
__init__
        self.session.remove_expired_responses()
      File "/home/david/Projects/MythTv/mythtv-
master/mythtv/bindings/python/MythTV/ttvdb/requests_cache_compatability
.py", line 40, in remove_expired_responses
        self.cache.remove_old_entries(datetime.utcnow() -
self._cache_expire_after)
    TypeError: unsupported operand type(s) for -: 'datetime.datetime'
and 'int'


The python packages available on Fedora are close to what was mentioned
elsewhere on the mailing list, but not a strict superset.  I have the
following on Fedora 26.

  python2-future-0.16.0-4.fc26.noarch
  python2-requests-2.13.0-1.fc26.noarch
  python-requests-cache-0.4.6-8.fc26.noarch

Fedora 24 and 25 have the same future and requests-cache versions, but
requests is only at 2.10.0 on those releases.

I'm hoping this is a simple fix, like a missing conversion to/from
int/datetime.  Please let me know if I can help by testing anything.

David




More information about the mythtv-dev mailing list