- Exception in thread Thread-2 (_recv_stream):
- Traceback (most recent call last):
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
- yield
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/backends/sync.py", line 62, in start_tls
- raise exc
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/backends/sync.py", line 57, in start_tls
- sock = ssl_context.wrap_socket(
- 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
- return self.sslsocket_class._create(
- File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create
- self.do_handshake()
- 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
- self._sslobj.do_handshake()
- ConnectionResetError: [Errno 54] Connection reset by peer
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
- yield
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 218, in handle_request
- resp = self._pool.handle_request(req)
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py", line 253, in handle_request
- raise exc
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py", line 237, in handle_request
- response = connection.handle_request(request)
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection.py", line 86, in handle_request
- raise exc
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection.py", line 63, in handle_request
- stream = self._connect(request)
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_sync/connection.py", line 150, in _connect
- stream = stream.start_tls(**kwargs)
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/backends/sync.py", line 54, in start_tls
- with map_exceptions(exc_map):
- File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
- self.gen.throw(typ, value, traceback)
- File "/opt/homebrew/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
- raise to_exc(exc)
- httpcore.ConnectError: [Errno 54] Connection reset by peer
- The above exception was the direct cause of the following exception:
- Traceback (most recent call last):
- 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
- self.run()
- File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
- self._target(*self._args, **self._kwargs)
- File "/opt/homebrew/lib/python3.10/site-packages/thetadata/client.py", line 520, in _recv_stream
- self._stream_impl(msg)
- File "/Users/haghdoost/workspace/thetadata_scan/lotto_streaming_play.py", line 97, in callback
- em, umark = get_expected_move(msg.contract.root, msg.contract.exp)
- File "/Users/haghdoost/workspace/thetadata_scan/lotto_streaming_play.py", line 22, in get_expected_move
- r = tdaapi.getAtmStraddlePrice(symbol, expiration)
- File "/Users/haghdoost/workspace/thetadata_scan/mono_tda_api.py", line 157, in getAtmStraddlePrice
- value = self.lookup('AtmStraddle',
- File "/Users/haghdoost/workspace/thetadata_scan/mono_tda_api.py", line 181, in lookup
- value = fill_method(**fill_params)
- File "/Users/haghdoost/workspace/thetadata_scan/mono_tda_api.py", line 103, in fillAthmStraddlePrice
- r = self.tda_api.get_option_chain(symbol,
- File "/opt/homebrew/lib/python3.10/site-packages/tda/client/base.py", line 702, in get_option_chain
- return self._get_request(path, params)
- File "/opt/homebrew/lib/python3.10/site-packages/tda/client/synchronous.py", line 18, in _get_request
- resp = self.session.get(dest, params=params)
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 1045, in get
- return self.request(
- File "/opt/homebrew/lib/python3.10/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 205, in request
- return super(OAuth2Client, self).request(
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 821, in request
- return self.send(request, auth=auth, follow_redirects=follow_redirects)
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 908, in send
- response = self._send_handling_auth(
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 936, in _send_handling_auth
- response = self._send_handling_redirects(
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 973, in _send_handling_redirects
- response = self._send_single_request(request)
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_client.py", line 1009, in _send_single_request
- response = transport.handle_request(request)
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 217, in handle_request
- with map_httpcore_exceptions():
- File "/opt/homebrew/Cellar/[email protected]/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
- self.gen.throw(typ, value, traceback)
- File "/opt/homebrew/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
- raise mapped_exc(message) from exc
- httpx.ConnectError: [Errno 54] Connection reset by peer
[text] traceback
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- traceback
- Paste Code
- 23 Mar-2023
- 5.77 Kb
You can Share it:
Latest Code Pastes