This repository was archived by the owner on Mar 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
Getting TypeError: _wrap_socket() argument 'sock' must be _socket.socket, not SSLSocket #108
Copy link
Copy link
Closed
Description
Hello SignalFx Python,
I am getting the below error traceback when trying to call _BaseSignalFxIngestClient.send:
- I am exposed to the below traceback via the SignalFx
_loggerwithWARNINGverbosity. - Data points are not being ingested any more per the SignalFx UI, confirming the post is failing
2020-07-27 16:00:09,408:ERROR:signalfx.ingest:Posting data to SignalFx failed.
Traceback (most recent call last):
File "C:\path\to\venv\lib\site-packages\signalfx\ingest.py", line 245, in _send
self._post(self._batch_data(datapoints_list),
File "C:\path\to\venv\lib\site-packages\signalfx\ingest.py", line 275, in _post
response = session.post(url, data=data, timeout=timeout)
File "C:\path\to\venv\lib\site-packages\requests\sessions.py", line 578, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\path\to\venv\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "C:\path\to\venv\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "C:\path\to\venv\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\path\to\venv\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "C:\path\to\venv\lib\site-packages\urllib3\connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "C:\path\to\venv\lib\site-packages\urllib3\connectionpool.py", line 978, in _validate_conn
conn.connect()
File "C:\path\to\venv\lib\site-packages\urllib3\connection.py", line 362, in connect
self.sock = ssl_wrap_socket(
File "C:\path\to\venv\lib\site-packages\urllib3\util\ssl_.py", line 384, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\Python38\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Python38\lib\ssl.py", line 1031, in _create
self._sslobj = self._context._wrap_socket(
TypeError: _wrap_socket() argument 'sock' must be _socket.socket, not SSLSocket
This started popping up when I bumped SignalFx from version 1.1.6 to 1.1.9. When I reinstall 1.1.6, I continue to get this error. It seems that temporarily, I'm stuck with this error.
Is this a SignalFx problem, or a problem with requests or urllib3? If it's a SignalFx problem, what might I be doing wrong?
Versions
- OS: Windows 10
- Python: 3.8.2 and 3.8.5
- OpenSSL-Win64: 1.1.1g
Here are a few of my pip installed packages that seem relevant (all newest versions as of July 27th 2020):
requests==2.24.0
signalfx==1.1.9
urllib3==1.25.10
eventlet==0.25.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels