Closed gene1wood closed 3 years ago
Temporary fix: pip install requests-cache==0.5.0
New release of tvdb_api should fix this for now, tvdb_api==3.1.0
Hi, I'm unsure why this still doesn't work here, so any hint appreciated. I'm on a Manjaro system (22.0.0, Codename Sikaris) and installed via pacman:
To install (1):
python-cattrs 22.2.0-2 (Required By: python-requests-cache) community
To build (4):
python-url-normalize 1.4.3-16 AUR
python-requests-cache 0.9.7-1 AUR
python-tvdb_api 3.1-1 AUR
tvnamer 3.0.4-1 AUR
So, If I understand this thread correctly, _to_bytes
is gone in requests-cache 0.9.7 but this is fixed in tvdb_api 3.1-1.
Nevertheless, I still get the same error:
ImportError: cannot import name '_to_bytes' from 'requests_cache.backends.base' (/usr/lib/python3.10/site-packages/requests_cache/backends/base.py)
And it seems that this has NOT been fixed in 3.1.0:
[freddy@hades ~]$ grep -E '__version|_to_bytes' /usr/lib/python3.10/site-packages/tvdb_api.py
__version__ = "3.1.0"
from requests_cache.backends.base import _to_bytes, _DEFAULT_HEADERS
key.update(_to_bytes(request.method.upper()))
key.update(_to_bytes(url))
key.update(_to_bytes(body))
key.update(_to_bytes(name))
key.update(_to_bytes(value))
So, what's going wrong here? Did I miss something?
Having the same problem :
Traceback (most recent call last):
File "/usr/bin/tvnamer", line 33, in
With the release of requests-cache 0.6.0 the
_to_bytes
method is no longer available and tvdb_api depends on this methodThis results in this error
One mitigation would be to limit the versions of requests-cache to 0.5.0 or earlier