Hi,
Im using the Datastream get_bundle_data to returns several items for a universe of stocks. We have set up a loop to cycle our universe. It works fine,but then randomly we get an error and it says it has did connected. Can you please advise me on the following. I should not we are within the max requests and on retry it works.
1. How can we handle this so it avoids this disconnection. We currently have the program use tenacity retry, a wrapper from python but this is less than ideal. We want to avoid these errors all together.
2. Can we use multithreading to make this faster, we don't have this in place currently but would like to do it. Or any other optimisations you can recommend based on screenshots.
here is the exception:
on 40: HTTPSConnectionPool(host='product.datastream.com', port=443): Read timed out.
on 40: _get_json_Response: Exception Occured:
on 40: HTTPSConnectionPool(host='product.datastream.com', port=443):
Read timed out.
on 40: get_bundle_data: Exception Occured
on 40: (<class 'TypeError>, TypeError("argument of type 'None Type' is not
Iterable"), <traceback object at 0x00000227252BCC40>)
on 40: None
on 40: Traceback (most recent call last):
File "C:\Users\sayersqvm\miniconda3/envs/qvmLive\lib\site-
packages\DatastreamDSWS\DS_Response.py", line 209, in get_bundle_data
if 'DataResponses' in json_Response:
TypeError: argument of type 'None Type' is not iterable
on 62: ("Connection aborted.", RemoteDisconnected('Remote end closed connection without response"))
on 62: _get_json_Response: Exception Occured:
on 62: ('Connection aborted.", RemoteDisconnected('Remote end closed
connection without response'))
on 62: get_bundle_data: Exception Occured
on 62: (<class 'TypeError>, TypeError("argument of type 'None Type' is not
Iterable"), <traceback object at 0x0000022724802040>)
on 62: None
Reply
31
Search