TypeError: 'NoneType' object is not callable

Questions, issues regarding dispy / pycos

Moderator: admin

Giri
Site Admin
Posts: 58
Joined: Sun Dec 27, 2020 5:35 pm

Re: TypeError: 'NoneType' object is not callable

Post by Giri »

If the above output was from program running on dispynode that gave the error (TypeError: 'NoneType' object is not callable), then I don't know why it did - the output from test program shows dispynode should work fine. I have now installed Python 3.6.9 to verify that dispy works fine. Please check test program on the node with same Python you are using to test with dispynode. If it still gives error, please post full output from when dispynode starts until end (including exception trace).

If you want to try a fix, copy dispynode program elsewhere and change the statement "raise StopIteration(None, 'ACK')" at the end of "def setup_computation(msg, task=None)" function and right above "def terminate_job(...)' with "raise StopIteration((None, 'ACK'))" (i.e., make "None, 'ACK'" to a tuple) and test. If that works, I will consider committing this change for next release (although I would like to undertand why this fails in your case).
uchendu-zhaw
Posts: 8
Joined: Sun Apr 11, 2021 2:40 pm

Re: TypeError: 'NoneType' object is not callable

Post by uchendu-zhaw »

Thanks a lot for your feedback, it works!

Changing

Code: Select all

raise StopIteration(None, 'ACK')
to

Code: Select all

raise StopIteration((None, 'ACK'))
solves this problem.

It's maybe still worth to mention that this error did not occur when I tested dispy in a docker container with a clean Ubuntu 18.
Post Reply