Error when creating my first agent: AgentNotRegisteredError

73 views
Skip to first unread message

Sarah

unread,
Apr 26, 2017, 12:56:17 PM4/26/17
to spade-users
Hello,

I successfully installed spade on windows 7 (https://github.com/javipalanca/spade).

I would like to create my first agent. To do that, i launch configure.py and runspade.py as follow:

(python27) C:\Anaconda3\envs\python27\Scripts\spade>python configure.py localhost
Translating localhost DNS to IP (127.0.0.1).

(python27) C:\Anaconda3\envs\python27\Scripts\spade>python runspade.py
SPADE  ←[33;1m2.2←[0m  <gus...@gmail.com> - http://spade2.googlecode.com
Starting SPADE......←[32m [done]←[0m

 ←[33;1m [info] ←[0mWebUserInterface serving at port 8008

I created "myFirstAgent.py":

import spade

class MyAgent(spade.Agent.Agent):
        def _setup(self):
                print ("MyAgent starting . . .")
                
if __name__ == "__main__":
a = MyAgent("ag...@myhost.myprovider.com", "secret")
a.start()

but when i execute the above code, i got the following error:

ag...@myhost.myprovider.com:[spade] There is no SPADE platform at myhost.myprovider.com . Agent dying... , error
ag...@myhost.myprovider.com:[spade] Could not register agent ag...@myhost.myprovider.com , error
ag...@myhost.myprovider.com:[spade] Did not send 'unavailable' presence: 'MyAgent' object has no attribute 'roster' , warn 
AgentNotRegisteredError

How can i register my agent ? how can i resolve this error ?

Thank you for your help

Javi Palanca

unread,
Apr 26, 2017, 12:59:25 PM4/26/17
to spade...@googlegroups.com
change myhost.myprovider.com to your IP (127.0.0.1)
myhost.myprovider.com is just an example

Javi


--
You received this message because you are subscribed to the Google Groups "spade-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spade-users...@googlegroups.com.
To post to this group, send email to spade...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sarah

unread,
Apr 27, 2017, 4:28:07 AM4/27/17
to spade-users
Thank you very much,
it works fine!
Reply all
Reply to author
Forward
0 new messages