chembl / chembl_webresource_client

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

Importing `new_client` suddenly started to fail #71

Closed martin-sicho closed 4 years ago

martin-sicho commented 4 years ago

I suddenly started to get an exception when running the following:

from chembl_webresource_client.new_client import new_client

Traceback:

python3.6/site-packages/chembl_webresource_client/url_query.py", line 236, in set_format
    raise Exception('{0} is not an available format ({1})'.format(frmt, available_formats))
Exception: svg+xml is not an available format (['xml', 'json', 'yaml', 'svg'])

I am using version 0.10.0 of the client

I guess the api has changed and something broke? Any ideas? Thanks a lot in advance.

justdis commented 4 years ago

Hey! I am also running into this problem. Have you found any work arounds?

eloyfelix commented 4 years ago

Thanks for reporting. It's indeed caused by some changes made in our API. We'll release a fixed version of the library as soon as possible.

martin-sicho commented 4 years ago

@justdis I made a quick fix (d56524c) without much understanding of the code so beware. It doesn't break my apps and that is all that matters to me right now.

justdis commented 4 years ago

@martin-sicho thank you! i am new to git so I'm not sure how to pull your version of the code in place of python ChEMBL package I have in my conda environment, so that it can be called by the code. i will try to figure it out.

martin-sicho commented 4 years ago

@justdis

You can try:

pip install -e git+https://github.com/martin-sicho/chembl_webresource_client@d56524cc3910d5051d4774441b5686a8e255d4ec#egg=chembl_webresource_client
justdis commented 4 years ago

@justdis

You can try:

pip install -e git+https://github.com/martin-sicho/chembl_webresource_client@d56524cc3910d5051d4774441b5686a8e255d4ec#egg=chembl_webresource_client

@martin-sicho woah! thank you! it successfully imported. getting the rest of my env set up to try this code :)

justdis commented 4 years ago

@martin-sicho my code seems to be running just fine, thanks for both the fix and the install!

martin-sicho commented 4 years ago

No problem, but it seems @eloyfelix fixed it properly now so you might want to use that commit. Thanks for being so quick @eloyfelix :)

eloyfelix commented 4 years ago

hold a sec! I'm still working on it :) I'll release a proper pip package when it's done

martin-sicho commented 4 years ago

@eloyfelix Haha, sorry. I thought that was it. Thanks :)

eloyfelix commented 4 years ago

you can now use the code in the master branch, I'll fix some tests that changed after today's release and ship a new pip package soon.

eloyfelix commented 4 years ago

Please find the updated pip package. Tests that are not passing are under control and will be updated soon.

https://pypi.org/project/chembl-webresource-client/

Thanks @waltonseymour for spotting my error...