You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After following all the steps, when I try to run following
python torrenthunt.py
I am getting an below error
TypeError: Invalid first argument to register(). ForwardRef('CachedResponse') is not a class.
Entire stacktrace is below
`(env) ➜ torrenthunt git:(main) ✗ python torrenthunt.py
Traceback (most recent call last):
File "/Users/amit/torrenthunt/torrenthunt.py", line 5, in
from src import *
File "/Users/amit/torrenthunt/src/init.py", line 2, in
from src.objs import config, dbSql
File "/Users/amit/torrenthunt/src/objs.py", line 5, in
import telebot, py1337x
File "/Users/amit/env/lib/python3.10/site-packages/py1337x/init.py", line 1, in
from py1337x.py1337x import py1337x
File "/Users/amit/env/lib/python3.10/site-packages/py1337x/py1337x.py", line 2, in
import requests_cache
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/init.py", line 43, in
from .backends import *
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/backends/init.py", line 8, in
from .base import BaseCache, BaseStorage
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/backends/base.py", line 18, in
from ..serializers import init_serializer
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/init.py", line 6, in
from .preconf import (
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/preconf.py", line 26, in
base_stage = CattrStage() #: Base stage for all serializer pipelines
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/cattrs.py", line 32, in init
self.converter = init_converter(factory)
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/cattrs.py", line 67, in init_converter
converter.register_structure_hook(
File "/Users/amit/env/lib/python3.10/site-packages/cattr/converters.py", line 263, in register_structure_hook
self._structure_func.register_cls_list([(cl, func)])
File "/Users/amit/env/lib/python3.10/site-packages/cattr/dispatch.py", line 57, in register_cls_list
self._single_dispatch.register(cls, handler)
File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/functools.py", line 856, in register
raise TypeError(
TypeError: Invalid first argument to register(). ForwardRef('CachedResponse') is not a class.`
Please help me if possible, how to get rid of this.
The text was updated successfully, but these errors were encountered:
I am using Python 3.10.5
After following all the steps, when I try to run following
python torrenthunt.py
I am getting an below error
TypeError: Invalid first argument to
register()
. ForwardRef('CachedResponse') is not a class.Entire stacktrace is below
`(env) ➜ torrenthunt git:(main) ✗ python torrenthunt.py
Traceback (most recent call last):
File "/Users/amit/torrenthunt/torrenthunt.py", line 5, in
File "/Users/amit/torrenthunt/src/init.py", line 2, in
File "/Users/amit/torrenthunt/src/objs.py", line 5, in
File "/Users/amit/env/lib/python3.10/site-packages/py1337x/init.py", line 1, in
File "/Users/amit/env/lib/python3.10/site-packages/py1337x/py1337x.py", line 2, in
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/init.py", line 43, in
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/backends/init.py", line 8, in
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/backends/base.py", line 18, in
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/init.py", line 6, in
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/preconf.py", line 26, in
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/cattrs.py", line 32, in init
File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/cattrs.py", line 67, in init_converter
converter.register_structure_hook(
File "/Users/amit/env/lib/python3.10/site-packages/cattr/converters.py", line 263, in register_structure_hook
self._structure_func.register_cls_list([(cl, func)])
File "/Users/amit/env/lib/python3.10/site-packages/cattr/dispatch.py", line 57, in register_cls_list
self._single_dispatch.register(cls, handler)
File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/functools.py", line 856, in register
raise TypeError(
TypeError: Invalid first argument to
register()
. ForwardRef('CachedResponse') is not a class.`Please help me if possible, how to get rid of this.
The text was updated successfully, but these errors were encountered: