chembl_webresource_client icon indicating copy to clipboard operation
chembl_webresource_client copied to clipboard

Query hangs after reaching specific entry

Open ptourlas opened this issue 2 years ago • 1 comments

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?

ptourlas avatar Mar 10 '22 09:03 ptourlas

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.

ailnicka avatar Feb 09 '23 10:02 ailnicka