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
from chembl_webresource_client.new_client import new_client
I get this error:
TypeError Traceback (most recent call last)
Input In [7], in <cell line: 1>()
----> 1 from chembl_webresource_client.new_client import new_client
File ~\anaconda3\lib\site-packages\chembl_webresource_client\new_client.py:5, in
3 from urllib.parse import urlparse
4 import requests
----> 5 from chembl_webresource_client.query_set import QuerySet
6 from chembl_webresource_client.query_set import Model
7 from chembl_webresource_client.settings import Settings
File ~\anaconda3\lib\site-packages\chembl_webresource_client\query_set.py:7, in
5 from chembl_webresource_client import version
6 from chembl_webresource_client.settings import Settings
----> 7 from chembl_webresource_client.url_query import UrlQuery
9 #-----------------------------------------------------------------------------------------------------------------------
11 class Model(object):
File ~\anaconda3\lib\site-packages\chembl_webresource_client\url_query.py:4, in
1 author = 'mnowotka'
3 from chembl_webresource_client.settings import Settings
----> 4 from chembl_webresource_client.query import Query
5 from xml.dom.minidom import parseString
7 from urllib.parse import urlencode
File ~\anaconda3\lib\site-packages\chembl_webresource_client\query.py:4, in
2 import os, os.path
3 import requests
----> 4 import requests_cache
5 from chembl_webresource_client.cache import monkeypatch_requests_cache
6 from requests.packages.urllib3.util import Retry
File ~\anaconda3\lib\site-packages\requests_cache_init_.py:35, in
31 return Placeholder
34 try:
---> 35 from .backends import *
36 from .patcher import *
37 from .models import *
File ~\anaconda3\lib\site-packages\requests_cache\backends_init_.py:8, in
5 from typing import Callable, Dict, Iterable, Type, Union
7 from .. import get_placeholder_class
----> 8 from .base import BaseCache, BaseStorage
10 # Backend-specific keyword arguments equivalent to 'cache_name'
11 CACHE_NAME_KWARGS = ['db_path', 'db_name', 'namespace', 'table_name']
File ~\anaconda3\lib\site-packages\requests_cache\backends\base.py:13, in
11 from ..cache_keys import create_key, remove_ignored_params, remove_ignored_url_params, url_to_key
12 from ..models import AnyRequest, AnyResponse, CachedResponse
---> 13 from ..serializers import init_serializer
15 # Specific exceptions that may be raised during deserialization
16 DESERIALIZE_ERRORS = (AttributeError, ImportError, TypeError, ValueError, pickle.PickleError)
File ~\anaconda3\lib\site-packages\requests_cache\serializers_init_.py:25, in
23 try:
24 from .cattrs import CattrStage
---> 25 from .preconf import (
26 bson_serializer,
27 json_serializer,
28 pickle_serializer,
29 safe_pickle_serializer,
30 yaml_serializer,
31 )
32 except ImportError as e:
33 CattrStage = get_placeholder_class(e) # type: ignore
File ~\anaconda3\lib\site-packages\requests_cache\serializers\preconf.py:24, in
21 from .cattrs import CattrStage
22 from .pipeline import SerializerPipeline, Stage
---> 24 base_stage = CattrStage() #: Base stage for all serializer pipelines
25 bson_preconf_stage = CattrStage(bson_preconf.make_converter) #: Pre-configured stage for BSON
26 json_preconf_stage = CattrStage(json_preconf.make_converter) #: Pre-configured stage for JSON
File ~\anaconda3\lib\functools.py:855, in singledispatch..register(cls, func)
853 else:
854 if func is not None:
--> 855 raise TypeError(
856 f"Invalid first argument to register(). "
857 f"{cls!r} is not a class."
858 )
859 ann = getattr(cls, 'annotations', {})
860 if not ann:
TypeError: Invalid first argument to register(). ForwardRef('CachedResponse') is not a class.
The text was updated successfully, but these errors were encountered:
parmidazamani
changed the title
new_client is failing to import from chembl-webresource-client
new_client is failing to import from chembl_webresource_client
Sep 14, 2022
I installed chembl-webresource-client from https://pypi.org/project/chembl-webresource-client/
but when I run
from chembl_webresource_client.new_client import new_client
I get this error:
The text was updated successfully, but these errors were encountered: