I have tried this code and it is giving me an Internal server error.
Getting list of GIs for term=Metazoa[Organism] ...
Downloading 22343398 entries from NCBI protein database in batches of 1000 entries...
Traceback (most recent call last):
File "biopython.py", line 26, in <module>
search_handle = Entrez.epost( db, id=",".join( giList ) )
File "/usr/lib/python3.6/site-packages/Bio/Entrez/__init__.py", line 129, in epost
return _open(cgi, variables, post=True)
File "/usr/lib/python3.6/site-packages/Bio/Entrez/__init__.py", line 526, in _open
raise exception
File "/usr/lib/python3.6/site-packages/Bio/Entrez/__init__.py", line 522, in _open
handle = _urlopen(cgi, data=_as_bytes(options))
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error
How to resolve it?
did you try iterating over the resultset ids and fetching them one-by-one?
I am not sure NCBI would tolerate 1.3 million individual requests