Error when running test_program.py

Added by Joel about 1 month ago

Hello
I get his error when I try to run test_program.py

@Checking NEXT API status...
<< HTTP request GET /next/2/ {
"message": "",
"system_running": true,
"timestamp": 1586777233497,
"valid_version": true
}
Logging in NEXT API...
<< HTTP request POST /next/2/login {
"country": "SE",
"environment": "exttest",
"expires_in": 300,
"private_feed": {
"encrypted": true,
"hostname": "priv.api.test.nordnet.se",
"port": 443
},
"public_feed": {
"encrypted": true,
"hostname": "pub.api.test.nordnet.se",
"port": 443
},
"session_key": "d7bea8a8a97112c88d30a7c9ff0ae2f25763d931"
}

Connecting to feed pub.api.test.nordnet.se:443...

<< Sending cmd to feed: {'cmd': 'login', 'args': {'session_key': 'd7bea8a8a97112c88d30a7c9ff0ae2f25763d931', 'service': 'NEXTAPI'}}
<< Sending cmd to feed: {'cmd': 'subscribe', 'args': {'t': 'price', 'm': 11, 'i': '101'}}

Starting receiving from socket...

Process Process-1:
Traceback (most recent call last):
File "/Users/joelrietz/opt/anaconda3/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/Users/joelrietz/opt/anaconda3/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "./test_program.py", line 147, in receive_message_from_socket
buffer = do_receive_from_socket(socket, buffer)
File "./test_program.py", line 131, in do_receive_from_socket
new_data = socket.recv(1024).decode('utf-8')
File "/Users/joelrietz/opt/anaconda3/lib/python3.7/ssl.py", line 1056, in recv
return self.read(buflen)
File "/Users/joelrietz/opt/anaconda3/lib/python3.7/ssl.py", line 931, in read
return self._sslobj.read(len)
ConnectionResetError: [Errno 54] Connection reset by peer@

Any suggestions?


Replies (2)

RE: Error when running test_program.py - Added by Nordnet_Support about 1 month ago

This issue has been resolved. Sorry for the inconvenience.

Please run the program again. It should work.

RE: Error when running test_program.py - Added by Nelson 3 days ago

The output should appear to be identical to the output produced by running the Python programs https://www.prepaidgiftbalance.one/

(1-2/2)