[mythtv] ttvdb on Fedora 26

Bill Meek keemllib at gmail.com
Wed Aug 30 03:46:50 UTC 2017


On 08/29/2017 08:32 PM, David Hampton wrote:
> 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.

...

 >      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

On my 14.04 *buntu box, requests-cache is 0.4.13. But I used: pip install
--upgrade requests-cache to get it. My newer boxen have 0.4.13 available
as packages (apt-get.)

In:

     /usr/lib/python2.7/dist-packages/requests_cache/core.py

or wherever your packages live, you should see: self._cache_expire_after = expire_after.
And expire_after is an instance of timedelta, not an int.

-- 
Bill


More information about the mythtv-dev mailing list