excalibur: fails to start on python 3.10.1
excalibur fails to load with python version 3.10.1 giving the below error :
Traceback (most recent call last):
File "/home/murali/.local/bin/excalibur", line 5, in <module>
from excalibur.cli import cli
File "/home/murali/.local/lib/python3.10/site-packages/excalibur/cli.py", line 7, in <module>
from . import __version__, settings
File "/home/murali/.local/lib/python3.10/site-packages/excalibur/settings.py", line 10, in <module>
from . import configuration as conf
File "/home/murali/.local/lib/python3.10/site-packages/excalibur/configuration.py", line 7, in <module>
from backports.configparser import ConfigParser
File "/home/murali/.local/lib/python3.10/site-packages/backports/configparser/__init__.py", line 130, in <module>
from collections import MutableMapping
ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 7
- Comments: 16
Same issue here as the one pictured and solved by kuirolo hereinabove although there seems to be a typo in what @kuirolo & @sh4yce mention at the final step of the fix (it is werkzeug and not workzeug).
To sum up, I was able to run
excalibur initdb
andexcalibur webserver
successfully after doing the following:pip install -U configparser
pip install -U flask
from werkzeug.utils import secure_filename
(i.e. overwriting previous line containingfrom werkzeug import secure_filename
)Apologies if this is a lot of terminal dumps and not a lot of pull requests. I’m fairly new to contributing.
This seems partly related to issue #152 which I had on python 3.8 with similar
ImportError
s.On python 3.10, starting from a fresh venv I had the following chain of
ImportError
s while trying to runexcalibur initdb
, the first few were resolved by updated the importing package as @Andrflor suggested.TL;DR: this issue might be resolved by moving up some of the version requirements in
setup.py
, and changing an import call inexcalibur.www.views
Here’s what happend for me:
With option captial
-U
this resolved @muralikodali 's issue for me.This is an upstream issue with flask 1.1.0, so it is resolved by upgrading. I also had this issue on python 3.8 after resolving issue #152 .
Here I think the solution is changing the
excalibur.www.views
import call to reflect the refactoring of workzeug in 2.1.1. According to this stackoverflowsecure_filename
now has to be imported usingfrom workzeug.utils import secure_filename
.I’ll take a crack at fixing this tomorrow if I have time.
[Edited for clarity and terminal formatting]
Same error of @muralikodali (ImportError: cannot import name ‘MutableMapping’ from ‘collections’). I tried to follow your suggestions (@oleole39 ) but i couldn’t solve the issue. It raises me this error:
but the way i have:
camelot-py==0.11.0
While upgrading configparser and flask it raised me this:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. excalibur-py 0.4.3 requires configparser<3.6.0,>=3.5.0, but you have configparser 6.0.0 which is incompatible. excalibur-py 0.4.3 requires Werkzeug<1.0.0, but you have werkzeug 3.0.1 which is incompatible
I have python 3.11.5