Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(linux): TypeError: Invalid first argument to register(). ForwardRef('CachedResponse') is not a class. #6119

Closed
sentry-io bot opened this issue Jan 17, 2022 · 1 comment · Fixed by #6124

Comments

@sentry-io
Copy link

sentry-io bot commented Jan 17, 2022

Sentry Issue: KEYMAN-LINUX-X

TypeError: Invalid first argument to `register()`. ForwardRef('CachedResponse') is not a class.
  File "functools.py", line 856, in register
    raise TypeError(
  File "cattr/dispatch.py", line 57, in register_cls_list
    self._single_dispatch.register(cls, handler)
  File "cattr/converters.py", line 269, in register_structure_hook
    self._structure_func.register_cls_list([(cl, func)])
  File "/usr/lib/python3/dist-packages/requests_cache/serializers/cattrs.py", line 67, in init_converter
    converter.register_structure_hook(
  File "/usr/lib/python3/dist-packages/requests_cache/serializers/cattrs.py", line 32, in __init__
    self.converter = init_converter(factory)
...
(8 additional frame(s) were not displayed)

This causes the package builds on Jenkins to fail. It got introduced with the recent fix for #6085.

@ermshiperete
Copy link
Contributor

ermshiperete commented Jan 18, 2022

This is caused by a bug in Python 3.10.2 and 3.9.10: python-attrs/cattrs#206

ermshiperete added a commit that referenced this issue Jan 18, 2022
This works around a Python bug introduced in Python 3.10.2 and
3.9.10 (python-attrs/cattrs#206).

This change should be reverted once that bug is fixed and new
Python packages available in Debian/Ubuntu.

Fixes #6119.
ermshiperete added a commit that referenced this issue Jan 18, 2022
This works around a Python bug introduced in Python 3.10.2 and
3.9.10 (python-attrs/cattrs#206).

This change should be reverted once that bug is fixed and new
Python packages are available in Debian/Ubuntu.

Fixes #6119.
ermshiperete added a commit that referenced this issue Jan 18, 2022
This works around a Python bug introduced in Python 3.10.2 and
3.9.10 (python-attrs/cattrs#206).

This change should be reverted once that bug is fixed and new
Python packages are available in Debian/Ubuntu.

Fixes #6119.

(cherry picked from commit 412b6c6)
ermshiperete added a commit that referenced this issue Jan 18, 2022
This works around a Python bug introduced in Python 3.10.2 and
3.9.10 (python-attrs/cattrs#206).

This change should be reverted once that bug is fixed and new
Python packages are available in Debian/Ubuntu.

Fixes #6119.
ermshiperete added a commit that referenced this issue Jan 18, 2022
This works around a Python bug introduced in Python 3.10.2 and
3.9.10 (python-attrs/cattrs#206).

This change should be reverted once that bug is fixed and new
Python packages are available in Debian/Ubuntu.

Fixes #6119.

(cherry picked from commit 10e1697)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant