Closed jbmere closed 4 years ago
The problem is probably that you do the start and stop calls in a row, which are both asynchronous methods. Therefore, you probably stop the agent before the start is finished. My advice is to capture the future that returns start and wait for it:
future = dummy.start()
future.result()
Finally, yo can also use the quit_spade method that ends all the threads safely.
from spade import quit_spade
...
quit_spade()
Thanks for the hint provided It does help a lot. Now everything works fine
Description
I'm just trying to get running a naive agent according to the provide example, and I've got some unexpected output. See below
What I Did
from spade import agent class DummyAgent(agent.Agent): async def setup(self): print("Hello World! I'm agent {}".format(str(self.jid))) dummy = DummyAgent("dynrct_r01@apiict00.etsii.upm.es", "XXX") dummy.start() dummy.stop()