hharnisc / python-meteor

A meteor client for python
MIT License
157 stars 27 forks source link

AttributeError: 'NoneType' object has no attribute 'recv' #5

Closed mitar closed 9 years ago

mitar commented 10 years ago

The following program throws an error:

client = MeteorClient.MeteorClient('ws://127.0.0.1:3000/websocket')

def connected():
    client.close()

client.on('connected', connected)
client.connect()
Exception in thread WebSocketClient:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ws4py/websocket.py", line 427, in run
    if not self.once():
  File "/usr/local/lib/python2.7/dist-packages/ws4py/websocket.py", line 300, in once
    b = self.sock.recv(self.reading_buffer_size)
AttributeError: 'NoneType' object has no attribute 'recv'
hharnisc commented 9 years ago

Fixed, do a pip install -U python-meteor and you'll get the updated dependency. (Issue fixed in python-ddp)