Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

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

Open
ottopasuuna opened this issue May 16, 2018 · 3 comments
Open

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

ottopasuuna opened this issue May 16, 2018 · 3 comments
Labels

Comments

@ottopasuuna
Copy link
Member

'NoneType' object has no attribute 'recv'
Traceback (most recent call last):
  File "/home/pi/robocluster/robocluster/member.py", line 228, in _recv                                                                
    data = await self._socket.recv(size)
AttributeError: 'NoneType' object has no attribute 'recv'
Got remote stop DriveControl
'NoneType' object has no attribute 'recv'
Traceback (most recent call last):
  File "/home/pi/robocluster/robocluster/member.py", line 228, in _recv                                                                
    data = await self._socket.recv(size)
AttributeError: 'NoneType' object has no attribute 'recv'
@jpas
Copy link
Contributor

jpas commented May 21, 2018

Is there anything deeper in the call stack for this? I'd like to know when _recv is being called.

It shouldn't be called unless self._connected is set and self._socket is None if it is not set.

@ottopasuuna
Copy link
Member Author

Unfortunately that was all I had from the stack trace, and I couldn't see a way to figure out what exactly causes this (or any of the other open bugs). It only seems to happen when I'm using the ProcessManager's remote api, so trying to start and stop processes on remote machines repeatedly. Otherwise everything seems stable for the most part.

@jpas
Copy link
Contributor

jpas commented May 23, 2018

I think this bug has something to do with the __exit__ method of ProcessManager (source).

Using the event loop directly like that is probably causing this issue. Maybe use use Futures and loop.call_soon_threadsafe is a solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants