Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: ImportError: cannot import name 'Iterable' from 'collections' #29

Open
WildCard1 opened this issue Nov 24, 2021 · 1 comment
Open

Comments

@WildCard1
Copy link

WildCard1 commented Nov 24, 2021

Hi!

The docker image exits instantly. Logs show this error message when trying to run the mha:latest image on docker version 20.10.10, build b485636

docker logs 94edf9098de3
Traceback (most recent call last):
File "/usr/src/mha/server.py", line 12, in
import pygal
File "/usr/local/lib/python3.10/site-packages/pygal/init.py", line 33, in
from pygal.graph.bar import Bar
File "/usr/local/lib/python3.10/site-packages/pygal/graph/bar.py", line 27, in
from pygal.graph.graph import Graph
File "/usr/local/lib/python3.10/site-packages/pygal/graph/graph.py", line 26, in
from pygal._compat import is_list_like, is_str, to_str
File "/usr/local/lib/python3.10/site-packages/pygal/_compat.py", line 23, in
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/init.py)

@just5ky
Copy link

just5ky commented Nov 24, 2021

facing samilar issue using Docker compose

today at 23:29:33   File "/usr/src/mha/server.py", line 12, in <module>
today at 23:29:33 Traceback (most recent call last):
today at 23:29:33   File "/usr/src/mha/server.py", line 12, in <module>
today at 23:29:33     import pygal
today at 23:29:33     import pygal
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/__init__.py", line 33, in <module>
today at 23:29:33     from pygal.graph.bar import Bar
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/graph/bar.py", line 27, in <module>
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/__init__.py", line 33, in <module>
today at 23:29:33     from pygal.graph.graph import Graph
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/graph/graph.py", line 26, in <module>
today at 23:29:33     from pygal.graph.bar import Bar
today at 23:29:33     from pygal._compat import is_list_like, is_str, to_str
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/_compat.py", line 23, in <module>
today at 23:29:33     from collections import Iterable
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/graph/bar.py", line 27, in <module>
today at 23:29:33 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:33     from pygal.graph.graph import Graph
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/graph/graph.py", line 26, in <module>
today at 23:29:33     from pygal._compat import is_list_like, is_str, to_str
today at 23:29:33   File "/usr/local/lib/python3.10/site-packages/pygal/_compat.py", line 23, in <module>
today at 23:29:33     from collections import Iterable
today at 23:29:33 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:34 Container stopped
today at 23:29:35 Container started
today at 23:29:33 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:36 Traceback (most recent call last):
today at 23:29:36   File "/usr/src/mha/server.py", line 12, in <module>
today at 23:29:36     import pygal
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/__init__.py", line 33, in <module>
today at 23:29:36     from pygal.graph.bar import Bar
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/graph/bar.py", line 27, in <module>
today at 23:29:36     from pygal.graph.graph import Graph
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/graph/graph.py", line 26, in <module>
today at 23:29:36     from pygal._compat import is_list_like, is_str, to_str
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/_compat.py", line 23, in <module>
today at 23:29:36     from collections import Iterable
today at 23:29:36 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:36 Container stopped
today at 23:29:33 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:36 Traceback (most recent call last):
today at 23:29:36   File "/usr/src/mha/server.py", line 12, in <module>
today at 23:29:36     import pygal
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/__init__.py", line 33, in <module>
today at 23:29:36     from pygal.graph.bar import Bar
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/graph/bar.py", line 27, in <module>
today at 23:29:36     from pygal.graph.graph import Graph
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/graph/graph.py", line 26, in <module>
today at 23:29:36     from pygal._compat import is_list_like, is_str, to_str
today at 23:29:36   File "/usr/local/lib/python3.10/site-packages/pygal/_compat.py", line 23, in <module>
today at 23:29:36     from collections import Iterable
today at 23:29:36 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:37 Container started
today at 23:29:36     from collections import Iterable
today at 23:29:36 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:38 Traceback (most recent call last):
today at 23:29:38   File "/usr/src/mha/server.py", line 12, in <module>
today at 23:29:38     import pygal
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/__init__.py", line 33, in <module>
today at 23:29:38     from pygal.graph.bar import Bar
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/graph/bar.py", line 27, in <module>
today at 23:29:38     from pygal.graph.graph import Graph
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/graph/graph.py", line 26, in <module>
today at 23:29:38     from pygal._compat import is_list_like, is_str, to_str
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/_compat.py", line 23, in <module>
today at 23:29:38     from collections import Iterable
today at 23:29:38 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:38 Traceback (most recent call last):
today at 23:29:38   File "/usr/src/mha/server.py", line 12, in <module>
today at 23:29:38     import pygal
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/__init__.py", line 33, in <module>
today at 23:29:38     from pygal.graph.bar import Bar
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/graph/bar.py", line 27, in <module>
today at 23:29:38     from pygal.graph.graph import Graph
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/graph/graph.py", line 26, in <module>
today at 23:29:38     from pygal._compat import is_list_like, is_str, to_str
today at 23:29:38   File "/usr/local/lib/python3.10/site-packages/pygal/_compat.py", line 23, in <module>
today at 23:29:38     from collections import Iterable
today at 23:29:38 ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
today at 23:29:38 Container stopped
today at 23:29:38 Container stopped
today at 23:29:39 Container started```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants