javipalanca / spade

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

Installation and first use problem #63

Open aesmaeili opened 5 years ago

aesmaeili commented 5 years ago

Description

I installed spade using pip inside a virtual environment and then tried to run the hello-world agent. Although spade and all its dependencies are installed properly I face a TypeError: 'ABCMeta' object is not subscriptable error. I have tried both conda and virtualenv and still, I get the same error. I attach the pip packages and the exact error to the rest of this issue.

What I Did

the pip packages and versions are as follows: Package Version


aiohttp 3.6.0
aiohttp-jinja2 1.1.2
aioopenssl 0.4.1
aiosasl 0.4.0
aioxmpp 0.10.5
arrow 0.15.1
asn1crypto 0.24.0
async-timeout 3.0.1
attrs 19.1.0
Babel 2.7.0
certifi 2019.6.16 cffi 1.12.3
chardet 3.0.4
cryptography 2.7
dnspython 1.16.0
idna 2.8
Jinja2 2.10.1
jinja2-time 0.2.0
lxml 4.4.1
MarkupSafe 1.1.1
multidict 4.4.0
pip 19.2.2
pyasn1 0.4.7
pyasn1-modules 0.2.6
pycparser 2.19
pyOpenSSL 19.0.0
python-dateutil 2.8.0
pytz 2019.2
setuptools 41.0.1
singletonify 0.2.3
six 1.12.0
sortedcollections 1.1.2
sortedcontainers 2.1.0
spade 3.1.3
timeago 1.0.8
tzlocal 1.5.1
wheel 0.33.4
yarl 1.3.0

and the generated error is as follows: Traceback (most recent call last): File "test.py", line 1, in from spade import agent File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/spade/init.py", line 3, in from . import agent File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/spade/agent.py", line 18, in from spade.web import WebApp File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/spade/web.py", line 6, in from aiohttp import web as aioweb File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/aiohttp/init.py", line 6, in from .client import BaseConnector as BaseConnector File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/aiohttp/client.py", line 63, in from .client_reqrep import ClientRequest as ClientRequest File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 29, in from . import hdrs, helpers, http, multipart, payload File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/aiohttp/multipart.py", line 703, in class MultipartWriter(Payload): File "/usr/local/Caskroom/miniconda/4.6.14/miniconda3/envs/spade/lib/python3.7/site-packages/aiohttp/multipart.py", line 786, in MultipartWriter headers: Optional[MultiMapping[str]]=None TypeError: 'ABCMeta' object is not subscriptable

Is there anything that I am missing?

aesmaeili commented 5 years ago

The error was because of the version of multidict package. Updating it to 4.5 version resolved the issue. Until it is officially updated in the requirements, update the package as follows: pip install -U multidict

mariosky commented 5 years ago

Please do not close this issue, everyone installing for the first time will have this problem.

aesmaeili commented 5 years ago

The issue reopened.

javipalanca commented 4 years ago

Hi. check the new released version (3.1.4) that I hope will fix this issue.