javipalanca / spade

Smart Python Agent Development Environment
MIT License
258 stars 98 forks source link

Spade Agents First Time Configuration Issue/Error #105

Open DiogoMartinhoISEP opened 1 year ago

DiogoMartinhoISEP commented 1 year ago

Description

I am trying to follow the Hello world tutorilal with the simple example:

from spade import agent,quit_spade

class DummyAgent(agent.Agent):
    async def setup(self):
        print("HelloWorld!I'm agent{}".format(str(self.jid)))

dummy=DummyAgent("server-hidden here", "pass-hidden here")
future=dummy.start()
future.result()
dummy.stop()
quit_spade()

What I Did

I installed spade using the command specified:

pip install spade

Paste the command(s) you ran and the output. pip install spade If there was a crash, please include the traceback here.

Traceback (most recent call last):
  File "C:\Users\diogo\PycharmProjects\SpadeClass\main.py", line 1, in <module>
    from spade import agent,quit_spade
  File "C:\Users\diogo\PycharmProjects\SpadeClass\venv\Lib\site-packages\spade\__init__.py", line 3, in <module>
    from . import agent
  File "C:\Users\diogo\PycharmProjects\SpadeClass\venv\Lib\site-packages\spade\agent.py", line 10, in <module>
    import aioxmpp
  File "C:\Users\diogo\PycharmProjects\SpadeClass\venv\Lib\site-packages\aioxmpp\__init__.py", line 101, in <module>
    from .errors import (  # NOQA
  File "C:\Users\diogo\PycharmProjects\SpadeClass\venv\Lib\site-packages\aioxmpp\errors.py", line 109, in <module>
    class ErrorCondition(structs.CompatibilityMixin, xso.XSOEnumMixin, enum.Enum):
  File "C:\Users\diogo\AppData\Local\Programs\Python\Python311\Lib\enum.py", line 557, in __new__
    raise exc
  File "C:\Users\diogo\AppData\Local\Programs\Python\Python311\Lib\enum.py", line 266, in __set_name__
    raise new_exc
TypeError: _value_ not set in __new__, unable to create it
0x1F602 commented 1 year ago

@DiogoMartinhoISEP SPADE does not suppor python 3.11 right now. I have successfully used python 3.9 with the develop branch @javipalanca is working on though. Change your python version to less than version 3.9 until the new release(s) come out.

javipalanca commented 1 year ago

The new SPADE version (3.3) now supports Python 3.9 and 3.10 (unfortunately we are waiting for aiohttp to support 3.11 to include it as a supported version)