[mythtv-users] ttvdb

Roland Ernst rcrernst at gmail.com
Sun Sep 19 11:20:35 UTC 2021


On Fri, Sep 17, 2021 at 5:07 PM mythtv <mythtv at mdabbs.org> wrote:

> On 9/16/21 2:11 PM, mythtv wrote:
> > On 9/16/21 1:02 PM, Roland Ernst wrote:
> >> Until this issue is fixed in requests_cache_compatability.py
> >> <
> https://github.com/MythTV/mythtv/blob/fixes/31/mythtv/bindings/python/MythTV/ttvdb/requests_cache_compatability.py#L49>
>
> >> ,
> >> you need to downgrade to requests-cache <  0.8.0 , which was released:
> >> Sep 7, 2021.
> >> Note: requests-cache  0.8.1 was released yesterday.
> >>
> >> Before downgrading, please report back if this change helps in above
> >> linked file:
> >> Change
> >> requests_cache.core.CachedSession.remove_expired_responses =
> >> remove_expired_responses
> >> to
> >> requests_cache.CachedSession.remove_expired_responses =
> >> remove_expired_responses
> >> and report back.
> >>
> >>
> >>
> >
> > Just making that change...
> >
> > Traceback (most recent call last):
> >    File "/usr/local/share/mythtv/metadata/Television/ttvdb.py", line
> > 2717, in <module>
> >      sys.exit(main())
> >    File "/usr/local/share/mythtv/metadata/Television/ttvdb.py", line
> > 2383, in main
> >      t = Tvdb(banners=False,
> >    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> > line 701, in __init__
> >      self.session.remove_expired_responses()
> >    File
> >
> "/usr/lib/python3.9/site-packages/MythTV/ttvdb/requests_cache_compatability.py",
>
> > line 38, in remove_expired_responses
> >      if not self._cache_expire_after:
> > AttributeError: 'CachedSession' object has no attribute
> > '_cache_expire_after'
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://lists.mythtv.org/mailman/listinfo/mythtv-users
> > http://wiki.mythtv.org/Mailing_List_etiquette
> > MythTV Forums: https://forum.mythtv.org
>
> I downgraded requests_cache to 0.7.5 and now I'm getting this:
>
> /usr/local/share/mythtv/metadata/Television/ttvdb.py:1952:
> DeprecationWarning: The SafeConfigParser class has been renamed to
> ConfigParser in Python 3.2. This alias will be removed in future
> versions. Use ConfigParser directly instead.
>    cfg = ConfigParser.SafeConfigParser()
> Traceback (most recent call last):
>    File "/usr/local/share/mythtv/metadata/Television/ttvdb.py", line
> 2717, in <module>
>      sys.exit(main())
>    File "/usr/local/share/mythtv/metadata/Television/ttvdb.py", line
> 2519, in main
>      seriesfound=searchseries(t, opts, series_season_ep)
>    File "/usr/local/share/mythtv/metadata/Television/ttvdb.py", line
> 1533, in searchseries
>      series_data = search_for_series(t, series_name, opts.language)
>    File "/usr/local/share/mythtv/metadata/Television/ttvdb.py", line
> 1515, in search_for_series
>      return tvdb[sid_or_name]
>    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> line 1185, in __getitem__
>      sid = self._nameToSid(key)
>    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> line 1164, in _nameToSid
>      selected_series = self._getSeries(name)
>    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> line 933, in _getSeries
>      allSeries = self.search(series)
>    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> line 913, in search
>      seriesEt = self._getetsrc(self.config['url_getSeries'] % (series))
>    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> line 870, in _getetsrc
>      src = self._loadUrl(url, language=language)
>    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> line 817, in _loadUrl
>      self.authorize()
>    File "/usr/lib/python3.9/site-packages/MythTV/ttvdb/tvdb_api.py",
> line 857, in authorize
>      r = self.session.post('https://api.thetvdb.com/login',
> json=self.config['auth_payload'], headers=self.headers)
>    File "/usr/lib/python3.9/site-packages/requests/sessions.py", line
> 590, in post
>      return self.request('POST', url, data=data, json=json, **kwargs)
>    File
> "/home/mythtv/.local/lib/python3.9/site-packages/requests_cache/session.py",
>
> line 101, in request
>      return super().request(
>    File "/usr/lib/python3.9/site-packages/requests/sessions.py", line
> 542, in request
>      resp = self.send(prep, **send_kwargs)
>    File
> "/home/mythtv/.local/lib/python3.9/site-packages/requests_cache/session.py",
>
> line 113, in send
>      cache_key = self.cache.create_key(request, **kwargs)
> TypeError: create_key() got an unexpected keyword argument 'timeout'
>
>

There is a known dependency deficiency of these python modules:

python3-urllib3
python3-requests
python3-requests-cache


Often, the latest releases do not fit together.
(See https://forum.mythtv.org/viewtopic.php?t=4037 )

It is up to the OS maintainers, do find valid combinations:

Debian Sid & Bullseye:
python3-urllib3_1.26.5-1~exp1_all.deb
python3-requests_2.25.1+dfsg-2_all.deb
python3-requests-cache_0.5.2-1_all.deb

Fedora Rawhide:
python3-urllib3-1.26.6-2.fc35.noarch.rpm
python3-requests-2.26.0-1.fc35.noarch.rpm
python3-requests-cache-0.5.1-9.fc35.noarch.rpm

Fedora 34:
python3-urllib3-1.25.10-4.fc34.noarch.rpm
python3-requests-2.25.1-1.fc34.noarch.rpm
python3-requests-cache-0.5.1-7.fc34.noarch.rpm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20210919/a8ebd330/attachment.htm>


More information about the mythtv-users mailing list