[text] traceback

Viewer

copydownloadembedprintName: traceback
  1. Exception in thread Thread-2 (_recv_stream):
  2. Traceback (most recent call last):
  3.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
  4.     yield
  5.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/backends/sync.py", line 62, in start_tls
  6.     raise exc
  7.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/backends/sync.py", line 57, in start_tls
  8.     sock = ssl_context.wrap_socket(
  9.   File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket
  10.     return self.sslsocket_class._create(
  11.   File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create
  12.     self.do_handshake()
  13.   File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake
  14.     self._sslobj.do_handshake()
  15. ConnectionResetError: [Errno 54] Connection reset by peer
  16.  
  17. During handling of the above exception, another exception occurred:
  18.  
  19. Traceback (most recent call last):
  20.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
  21.     yield
  22.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 218, in handle_request
  23.     resp = self._pool.handle_request(req)
  24.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py", line 253, in handle_request
  25.     raise exc
  26.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py", line 237, in handle_request
  27.     response = connection.handle_request(request)
  28.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection.py", line 86, in handle_request
  29.     raise exc
  30.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection.py", line 63, in handle_request
  31.     stream = self._connect(request)
  32.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection.py", line 150, in _connect
  33.     stream = stream.start_tls(**kwargs)
  34.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/backends/sync.py", line 54, in start_tls
  35.     with map_exceptions(exc_map):
  36.   File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
  37.     self.gen.throw(typ, value, traceback)
  38.   File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
  39.     raise to_exc(exc)
  40. httpcore.ConnectError: [Errno 54] Connection reset by peer
  41.  
  42. The above exception was the direct cause of the following exception:
  43.  
  44. Traceback (most recent call last):
  45.   File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
  46.     self.run()
  47.   File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
  48.     self._target(*self._args, **self._kwargs)
  49.   File "/opt/homebrew/lib/python3.10/site-packages/thetadata/client.py", line 520, in _recv_stream
  50.     self._stream_impl(msg)
  51.   File "/Users/haghdoost/workspace/thetadata_scan/lotto_streaming_play.py", line 97, in callback
  52.     em, umark = get_expected_move(msg.contract.root, msg.contract.exp)
  53.   File "/Users/haghdoost/workspace/thetadata_scan/lotto_streaming_play.py", line 22, in get_expected_move
  54.     r = tdaapi.getAtmStraddlePrice(symbol, expiration)
  55.   File "/Users/haghdoost/workspace/thetadata_scan/mono_tda_api.py", line 157, in getAtmStraddlePrice
  56.     value = self.lookup('AtmStraddle',
  57.   File "/Users/haghdoost/workspace/thetadata_scan/mono_tda_api.py", line 181, in lookup
  58.     value = fill_method(**fill_params)
  59.   File "/Users/haghdoost/workspace/thetadata_scan/mono_tda_api.py", line 103, in fillAthmStraddlePrice
  60.     r = self.tda_api.get_option_chain(symbol,
  61.   File "/opt/homebrew/lib/python3.10/site-packages/tda/client/base.py", line 702, in get_option_chain
  62.     return self._get_request(path, params)
  63.   File "/opt/homebrew/lib/python3.10/site-packages/tda/client/synchronous.py", line 18, in _get_request
  64.     resp = self.session.get(dest, params=params)
  65.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 1045, in get
  66.     return self.request(
  67.   File "/opt/homebrew/lib/python3.10/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 205, in request
  68.     return super(OAuth2Client, self).request(
  69.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 821, in request
  70.     return self.send(request, auth=auth, follow_redirects=follow_redirects)
  71.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 908, in send
  72.     response = self._send_handling_auth(
  73.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 936, in _send_handling_auth
  74.     response = self._send_handling_redirects(
  75.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 973, in _send_handling_redirects
  76.     response = self._send_single_request(request)
  77.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 1009, in _send_single_request
  78.     response = transport.handle_request(request)
  79.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 217, in handle_request
  80.     with map_httpcore_exceptions():
  81.   File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
  82.     self.gen.throw(typ, value, traceback)
  83.   File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
  84.     raise mapped_exc(message) from exc
  85. httpx.ConnectError: [Errno 54] Connection reset by peer

Editor

You can edit this paste and save as new: