dbr / tvdb_api

Simple to use interface to TheTVDB.com API in Python
The Unlicense
339 stars 63 forks source link

AttributeError: 'CachedSession' object has no attribute 'remove_expired_responses' #107

Open cweiske opened 1 month ago

cweiske commented 1 month ago

When running tvnamer on Debian 12 I get:

2024-10-11 16:15:32,483 - requests_cache.backends.sqlite - DEBUG - Opening connection to /tmp/tvdb_api--u1000-py3.sqlite:redirects
Traceback (most recent call last):
  File "/usr/bin/tvnamer", line 6, in <module>
    tvnamer.main.main()
  File "/usr/share/tvnamer/main.py", line 474, in main
    tvnamer(paths = sorted(args))
  File "/usr/share/tvnamer/main.py", line 360, in tvnamer
    tvdb_instance = Tvdb(
                    ^^^^^
  File "/usr/lib/python3/dist-packages/tvdb_api.py", line 703, in __init__
    self.session.remove_expired_responses()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CachedSession' object has no attribute 'remove_expired_responses'

This is probably because the python3-requests-cache package

It looks like CachedSession.remove_expired_responses() was deprecated in 1.0.0 and removed in 1.2.0

as described in https://aur.archlinux.org/packages/plover_plugins_manager#comment-988008