JamesJeffryes / pyclassyfire

A python client for the ClassyFire API
https://jamesjeffryes.github.io/pyclassyfire/
MIT License
15 stars 4 forks source link

KeyError: 'number_of_pages' #4

Closed Michelle822 closed 3 years ago

Michelle822 commented 3 years ago

Hello,

Do you know why i get the following error with the test file?:

Line of code: open("test_datatable_result_inchi.json", "w").write(json.dumps(get_results_multientry_multipage_patient(query_ids, return_format="json")))

Thanks a lot in advance!! Best, Michelle

DEBUG:urllib3.connectionpool:http://classyfire.wishartlab.com:80 "GET /queries/6188679.json HTTP/1.1" 500 48

KeyError Traceback (most recent call last)

in ----> 1 open("test_datatable_result_inchi.json", "w").write(json.dumps(get_results_multientry_multipage_patient(query_ids, return_format="json"))) ~\anaconda3\lib\site-packages\pybatchclassyfire\pybatchclassyfire.py in get_results_multientry_multipage_patient(query_ids_list, return_format) 596 597 result = json.loads(r.text) --> 598 num_pages = result["number_of_pages"] 599 600 KeyError: 'number_of_pages'