Try to restart the app. I think this is communication error. The only thing I can do is to add a default value of 0 in case of a key error but the thing is that i cannot reproduce it to fix it.
Let me know if the restart fixed and we will see how we proceed
I restarted (exited with ctr+c) and start again, nothing
Then I compile the file with powershell and replace the old pycgminer with 60 and with 5 timeout and not work