Skip to content

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

@mitar

Description

@mitar

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions