Skip to content

tvdb_api 3.1 still has "ImportError: cannot import name '_to_bytes' from 'requests_cache.backends.base'" bug #104

Description

@frank42hh
          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?

Originally posted by @frank42hh in #92 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions