I have been getting the following error whenever someone connects their miner:
2013-05-23 08:29:18+0000 [Protocol,0,141.0.48.3]
2013-05-23 08:29:18,619 ERROR protocol # [Failure instance: Traceback: : subscribe() takes exactly 1 argument (2 given)
/usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/protocol.py:192:dataReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/protocol.py:246:lineReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/services.py:13:_handle_event
/usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/services.py:81:call
--- ---
/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:137:maybeDeferred
/usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/services.py:78:_run
Although the mining seems to continue fine, it was a massive annoyance, without mentioning the additional logging mess it made. After much digging, the culprit turns out to be when the mining.subscribe method is called from protocol.py, Stratum didn't like the additional parameter being used (in my case CGMiner/3.1.0 or something similar) in msg_params.
As such, I have created a work around by adding some code directly after the following lines in protocol.py:
msg_id = message.get('id', 0)
msg_method = message.get('method')
msg_params = message.get('params')
msg_result = message.get('result')
msg_error = message.get('error')
The code being:
if msg_method == "mining.subscribe":
del msg_params[0:len(msg_params)]
This removes the error and everything SEEMS to be mining OK, however I was wondering peoples thoughts on it as it was just a hack. Could it effect anything down the line?
Unfortunately my Python is very poor, so please be nice with your comments