Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

'NoneType' object has no attribute 'write' #18

Closed
alphaonex86 opened this issue May 3, 2013 · 4 comments
Closed

'NoneType' object has no attribute 'write' #18

alphaonex86 opened this issue May 3, 2013 · 4 comments

Comments

@alphaonex86
Copy link

2013-05-03 14:41:44,935 ERROR protocol protocol.process_failure # [Failure instance: Traceback: <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'write'
/usr/lib64/python2.7/site-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py:614:_doReadOrWrite
/usr/lib64/python2.7/site-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py:215:doRead
/usr/lib64/python2.7/site-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py:221:_dataReceived
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:185:dataReceived
--- ---
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:230:lineReceived
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py:7:_handle_event
/home/stratum-mining-proxy/mining_libs/client_service.py:64:handle_event
/home/stratum-mining-proxy/mining_libs/stratum_listener.py:51:on_template
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:54:emit
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:160:emit
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:66:emit_single
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:102:writeJsonRequest
/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:83:transport_write
]
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 230, in lineReceived
result = self.event_handler._handle_event(msg_method, msg_params, connection_ref=self)
File "/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py", line 7, in _handle_event
return defer.maybeDeferred(wrap_result_object, self.handle_event(msg_method, msg_params, connection_ref))
File "/home/stratum-mining-proxy/mining_libs/client_service.py", line 64, in handle_event
job_id, prevhash, coinb1, coinb2, merkle_branch, version, nbits, ntime, clean_jobs)
File "/home/stratum-mining-proxy/mining_libs/stratum_listener.py", line 51, in on_template
cls.emit(job_id, prevhash, coinb1, coinb2, merkle_branch, version, nbits, ntime, clean_jobs)
File "/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 54, in emit
return Pubsub.emit(cls.event, _args, *_kwargs)
File "/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 160, in emit
subscription.emit_single(_args, *_kwargs)
File "/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 66, in emit_single
conn.writeJsonRequest(self.event, payload, is_notification=True)
File "/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 102, in writeJsonRequest
self.transport_write("%s\n" % serialized)
File "/usr/lib64/python2.7/site-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 83, in transport_write
self.transport.write(data)
AttributeError: 'NoneType' object has no attribute 'write'

@slush0
Copy link
Owner

slush0 commented May 3, 2013

Not a bug, it just writes to just-disconnected client.

@slush0 slush0 closed this as completed May 3, 2013
@alphaonex86
Copy link
Author

Ok, very strange, can you just put: Client XXX disconnected, it's to be more clear. and have less log.

@slush0
Copy link
Owner

slush0 commented May 3, 2013

It is opensource. Feel free to fix it and send send pull request. This has really low priority to me.

@alphaonex86
Copy link
Author

oki, I say that's because I'm dev Qt/C++, no python :(

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

No branches or pull requests

2 participants