You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import signalfx
token = 'my token'
signalflow_program = "my program"
signalflow_client = signalfx.SignalFx().signalflow(token=token, endpoint="my endpoint")
try:
print('Executing {0} ...'.format(signalflow_program))
computation = signalflow_client.execute(signalflow_program)
for msg in computation.stream():
print("test")
if isinstance(msg, signalfx.signalflow.messages.DataMessage):
print('{0}: {1}'.format(msg.logical_timestamp_ms, msg.data))
if isinstance(msg, signalfx.signalflow.messages.EventMessage):
print('{0}: {1}'.format(msg.timestamp_ms, msg.properties))
finally:
signalflow_client.close()
But I'm getting this error:
Traceback (most recent call last):
File "/Users/PycharmProjects/pythonRateLimits27/main.py", line 9, in <module>
computation = signalflow_client.execute(signalflow_program)
File "/Users/.conda/envs/pythonRateLimits27/lib/python2.7/site-packages/signalfx/signalflow/__init__.py", line 52, in execute
c = computation.Computation(exec_fn)
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/site-packages/signalfx/signalflow/computation.py", line 43, in __init__
self._stream = self._execute()
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/site-packages/signalfx/signalflow/computation.py", line 46, in _execute
return self._exec_fn(self._last_logical_ts)
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/site-packages/signalfx/signalflow/__init__.py", line 50, in exec_fn
return self._transport.execute(program, params)
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/site-packages/signalfx/signalflow/ws.py", line 73, in execute
self._send(request)
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/site-packages/signalfx/signalflow/ws.py", line 141, in _send
self.connect()
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/site-packages/ws4py/client/__init__.py", line 217, in connect
self.sock.connect(self.bind_addr)
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/ssl.py", line 864, in connect
self._real_connect(addr, False)
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/ssl.py", line 855, in _real_connect
self.do_handshake()
File "/Users/.conda/envs/pythonRateLimits27/lib/python3.7/ssl.py", line 828, in do_handshake
self._sslobj.do_handshake()
socket.error: [Errno 54] Connection reset by peer
Using CURL works correctly. Could you shed any light to solve this? Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hey team, I'm running the following code:
But I'm getting this error:
Using CURL works correctly. Could you shed any light to solve this? Thanks in advance!
The text was updated successfully, but these errors were encountered: