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

Python 3.9: TypeError: Invalid first argument to register(). ForwardRef('CachedResponse') is not a class. #20

Closed
a0x8o opened this issue Nov 9, 2022 · 3 comments
Labels

Comments

@a0x8o
Copy link

a0x8o commented Nov 9, 2022

On Python 3.9 I observe the following error (macOS):

File "/usr/local/Cellar/python@3.9/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py", line 855, in register
    raise TypeError(
TypeError: Invalid first argument to `register()`. ForwardRef('CachedResponse') is not a class.
@mgedmin
Copy link
Owner

mgedmin commented Nov 10, 2022

Can you show me the full traceback please?

@mgedmin
Copy link
Owner

mgedmin commented Nov 10, 2022

Google tells me this might be a bug in one of ghcloneall's dependencies, requests-cache: requests-cache/requests-cache#501

It was reported as fixed in requests-cache 0.9.1. What version of requests-cache do you have installed?

@mgedmin
Copy link
Owner

mgedmin commented Nov 10, 2022

As a workaround perhaps you can use ghcloneall --no-http-cache? The HTTP cache is primarily useful for development, when you run ghcloneall multiple times in succession, to avoid hitting GitHub API rate limits for unauthenticated requests.

Since I don't have the full traceback I can't tell if this happens at import time, or during install_cache(). If it happens during import time, --no-http-cache will not help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants