#1084947 tvnamer: Crash with "'CachedSession' object has no attribute 'remove_expired_responses'"

#1084947#5
Date:
2024-10-11 15:07:36 UTC
From:
To:
Dear Maintainer,

When using tvnamer to rename files, I get an error:

$ python3 -m tvnamer.main --dry-run ~/Videos/download/file.mp4
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/cweiske/dev/tools/tvnamer/tvnamer/main.py", line 550, in <module>
    main()
  File "/home/cweiske/dev/tools/tvnamer/tvnamer/main.py", line 540, in main
    tvnamer(paths=sorted(args))
  File "/home/cweiske/dev/tools/tvnamer/tvnamer/main.py", line 424, in tvnamer
    tvdb_instance = tvdb_api.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 error is caused because python3-tvdb-api 3.1-4 uses the API method which
has been removed in python3-requests-cache 1.2.0, and Debian ships 1.2.1-1.

For the version info see
https://aur.archlinux.org/packages/plover_plugins_manager#comment-988008

I reported this bug upstream at
https://github.com/dbr/tvdb_api/issues/107