08:07:15 4.81174 0.55301041 (4.81)
08:07:25 4.81925 0.0616 (4.81)
08:07:26 4.81925 0.48723349 (4.81)
08:08:58 4.81174 16.57171689 (4.81)
trade['price_currency'] != "USD"
08:08:58 4.81146 16.0 (4.81)
08:10:26 4.8 10.0 (4.81)
08:11:01 4.7999 3.0 (4.81)
08:11:25 4.79992 0.54994211 (4.81)
trade['price_currency'] != "USD"
08:11:25 4.79992 5.0 (4.81)
08:11:30 4.78 0.27 (4.81)
08:11:30 4.78 2.0 (4.81)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/rune/Programming/scripts/bitcoin/mtgox_io.py", line 78, in thread_func
msg = S.ws.recv()
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 349, in recv
b = self._recv(1)
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 413, in _recv
raise ConnectionClosedException()
ConnectionClosedException
error sending keepalive socket.io, trying reconnect
08:13:00 4.7998 3.0 (4.81)
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/rune/Programming/scripts/bitcoin/mtgox_io.py", line 78, in thread_func
msg = S.ws.recv()
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 349, in recv
b = self._recv(1)
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 413, in _recv
raise ConnectionClosedException()
ConnectionClosedException
error sending keepalive socket.io, trying reconnect
trade['price_currency'] != "USD"
08:14:27 4.7999 2.0 (4.81)
08:15:52 4.7998 3.0 (4.81)
08:16:06 4.8 30.0 (4.80)
08:17:13 4.7998 4.0 (4.80)
08:19:12 4.79906 0.03358625 (4.80)
trade['price_currency'] != "USD"
08:20:01 4.79001 1.48066947 (4.80)
08:20:37 4.79899 0.03190743 (4.80)
08:21:07 4.79894 1.22928907 (4.80)
08:21:38 4.79895 3.0 (4.80)
08:22:37 4.79895 2.80261836 (4.80)
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/rune/Programming/scripts/bitcoin/mtgox_io.py", line 78, in thread_func
msg = S.ws.recv()
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 349, in recv
b = self._recv(1)
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 413, in _recv
raise ConnectionClosedException()
ConnectionClosedException
error sending keepalive socket.io, trying reconnect
error sending keepalive socket.io, trying reconnect
Exception in thread Thread-8:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/rune/Programming/scripts/bitcoin/mtgox_io.py", line 78, in thread_func
msg = S.ws.recv()
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 349, in recv
b = self._recv(1)
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 411, in _recv
bytes = self.io_sock.recv(bufsize)
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 161, in recv
return self.ssl.read(bufsize)
SSLError: [Errno 1] _ssl.c:1350: error:1408F096:SSL routines:SSL3_GET_RECORD:encrypted length too long
Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/rune/Programming/scripts/bitcoin/mtgox_io.py", line 78, in thread_func
msg = S.ws.recv()
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 349, in recv
b = self._recv(1)
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 411, in _recv
bytes = self.io_sock.recv(bufsize)
File "/home/rune/Programming/scripts/bitcoin/websocket_client.py", line 161, in recv
return self.ssl.read(bufsize)
SSLError: [Errno 1] _ssl.c:1350: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
error sending keepalive socket.io, trying reconnect
08:24:08 4.79001 3.8303 (4.80)
Then the keepalive_func thread will detect it when trying to send a message, and it will try to reconnect. This succeeds (seemingly), but lasts little time before the connection is lost again, and the process starts over (as you can see from the log). At some point, the errors go from the ConnectionClosedException exception to SSL exceptions like "error:1408F096:SSL routines:SSL3_GET_RECORD:encrypted length too long", but these SSL errors seem to vary a lot. I would guess that the SSL Python module expects the wrong data, but Mt. Gox' server sends the right data, though I'm not sure about that.
So, not sure what to do about this... seems something isn't right somewhere (duh!).