chembl / chembl_webresource_client

Official Python client for accessing ChEMBL API
https://www.ebi.ac.uk/chembl/api/data/docs
Other
373 stars 95 forks source link

I can't access into chembl API #105

Closed tarsri closed 3 years ago

tarsri commented 3 years ago

Hi! I have a problem when I want to access chembl API, I can install chembl_webresource, but I can't access into the database, it said that

ImportError: cannot import name '_encode' from 'requests_cache.cache_keys' (/Users/tarapongsrisongkram/my_env/lib/python3.9/site-packages/requests_cache/cache_keys.py)

Here is my code pip install chembl_webresource_client

from chembl_webresource_client.new_client import new_client

Screen Shot 2564-07-08 at 21 48 41 Screen Shot 2564-07-08 at 21 48 46

I've try run it on collab but it doesn't work either, how can i fix it ? any help is appreciate P.S. I run on Python 3.9

alleFarell commented 3 years ago

I have faced the same issue today

eloyfelix commented 3 years ago

Hi, I can confirm the isue. The last version (0.7.0) of requests_cache broke the package. This also happened before when they released the 0.6.0.

If you install the previous version (0.6.4) it will work for you while we fix it.

pip install requests_cache==0.6.4
alleFarell commented 3 years ago

it works, Thank you very much

eloyfelix commented 3 years ago

new version 0.10.5 of chembl_webresource_client fixes the issue.

JWCook commented 3 years ago

Sorry about that! A few tips for making this less prone to breakage:

If you run into any more issues or have more questions, you're welcome to create an issue on the requests-cache repo.

tarsri commented 3 years ago

Hi! It works well, thank you for your response!

eloyfelix commented 3 years ago

Many thanks for your suggestions @JWCook. I used them :)

Closing this.