tubes icon indicating copy to clipboard operation
tubes copied to clipboard

NoneType object has no attribute pause

Open exarkun opened this issue 8 years ago • 5 comments

I have no explicit pause / unpause logic in my code but I reliably get this after the first value dribbles through the tube:

2017-05-02T13:49:41-0400 [twisted.internet.defer#critical] 
	Traceback (most recent call last):
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 651, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1030, in _cbDeferred
	    self.callback(self.resultList)
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 457, in callback
	    self._startRunCallbacks(result)
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 565, in _startRunCallbacks
	    self._runCallbacks()
	--- <exception caught here> ---
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 651, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/tubes/undefer.py", line 28, in done
	    pause.unpause()
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/tubes/kit.py", line 39, in unpause
	    self._friendPauser._actuallyResume()
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/tubes/_siphon.py", line 184, in _actuallyResume
	    fp.unpause()
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/tubes/kit.py", line 39, in unpause
	    self._friendPauser._actuallyResume()
	  File "/home/exarkun/Environments/kubetop/local/lib/python2.7/site-packages/tubes/_siphon.py", line 184, in _actuallyResume
	    fp.unpause()
	exceptions.AttributeError: 'NoneType' object has no attribute 'unpause'

exarkun avatar May 02 '17 18:05 exarkun

Do you have a reproducer for this, even if it isn't totally minimal?

glyph avatar May 03 '17 07:05 glyph

Thanks for filing these bugs, by the way! It's good to see some actual usage, and I hope we can get these fixed quickly and a new release out so you can move forward with this project :)

glyph avatar May 03 '17 07:05 glyph

At the moment my only reproducer is very non-minimal - it's to run kubetop from https://github.com/LeastAuthority/kubetop/tree/experimenting-with-tubes (which requires a Kubernetes API server to talk to). Presumably it can be reduced from this but I haven't tried yet.

exarkun avatar May 03 '17 11:05 exarkun

I'm in the middle of a move until the end of the week, so I won't have much time to look at this immediately. But I'm definitely interested in getting to the bottom of it. @dreid helped me a lot with the implementation of this logic (although it's been some time and I have no idea if he realistically has any more time than I do right now).

glyph avatar May 03 '17 16:05 glyph

Yea, no problem. I am eager to get tubes working in some projects but I'm not on a deadline or anything. Perhaps I'll even have a chance to produce a simpler reproducer for this issue before you or dreid find yourselves available to look into it.

exarkun avatar May 03 '17 16:05 exarkun