Rpc Crashes With Attributeerror: 'nonetype' Object Has No Attribute 'call'
I am trying to develop an agent that queries platform.historian but got this error message when using RPC query method: AttributeError: 'NoneType' object has no attribute 'call' cl
Solution 1:
Your agent doesn't connect to the platform nor does it "start". That is the issue you are dealing with here. I don't see how you are specifying your vip address to connect to the running platform either.
You need to run your agent before you are able to allow it to make rpc calls. Something like the following, modified from https://github.com/VOLTTRON/volttron/blob/develop/examples/SimpleForwarder/simpleforwarder/simpleforwarder.py#L118 as an example.
destination_vip="tcp://127.0.0.1:22916?serverkey=blah&publickey=wah&privatekey=nahagent=TMCAgent(config_path=cfg_path,identity=tester,address=destination_vip)event=gevent.event.Event()# agent.core.run set the event flag to true when agent is runninggevent.spawn(agent.core.run,event)# Wait until the agent is fully initialized and ready to # send and receive messages.event.wait(timeout=3)
Post a Comment for "Rpc Crashes With Attributeerror: 'nonetype' Object Has No Attribute 'call'"