chembl / chembl_webresource_client

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

Query hangs after reaching specific entry #115

Open ptourlas opened 2 years ago

ptourlas commented 2 years ago

Greetings!

I tried the following query:

from chembl_webresource_client.new_client import new_client
activity = new_client.activity
res = activity.filter(type__iexact='pka')
print(len(res))

which returns 12004. Trying to write the query result to a file like this:

from chembl_webresource_client.new_client import new_client

activity = new_client.activity
res = activity.filter(type__iexact='pka')

with open('chembl_query.txt', 'a') as f:
     for i in range (len(res)):
             f.write(str(res[i]))

but the process hangs after the 6980th entry returning a 500 error. Do I have to split the query in chunks somehow?

ailnicka commented 1 year ago

I have same problem, for short list of targets for which I need activities everything works fine, but for a longer list (not very long though, 116 targets) I get HttpApplicationError with code 500 every time.