Issue
I'm new to CKAN and I cannot get it working. For instance, I've got errors related to missing _request_ctx_stack
module as well as other errors like this:
ImportError: cannot import name 'abort' from partially initialized module 'flask' (most likely due to a circular import) (/usr/lib/ckan/default/lib/python3.10/site-packages/flask/__init__.py)
By googling around it seems that some Flask dependencies were updated on Oct. 30, breaking the compatibility (e.g., https://blog.miguelgrinberg.com/post/we-have-to-talk-about-flask/page/0).
Does anyone know how to get a working version of CKAN?
PS: I'm following the current instructions from https://docs.ckan.org/en/2.9/maintaining/installing/install-from-source.html
This is the list of currently installed modules in the virtual environment:
alembic==1.8.1
Babel==2.10.3
Beaker==1.11.0
bleach==5.0.1
blinker==1.7.0
certifi==2021.10.8
charset-normalizer==2.0.12
# Editable install with no version control (ckan==2.10.1)
-e /usr/lib/ckan/default/src/ckan
click==8.1.3
Deprecated==1.2.13
dominate==2.7.0
feedgen==0.9.0
Flask==3.0.0
Flask-Babel==1.0.0
Flask-Login==0.6.1
flask-multistatic==1.0
Flask-WTF==1.0.1
greenlet==1.1.2
idna==3.3
importlib-metadata==4.11.3
itsdangerous==2.1.2
Jinja2==3.1.2
lxml==4.9.1
Mako==1.2.2
Markdown==3.4.1
MarkupSafe==2.1.1
mypy==0.971
mypy-extensions==0.4.3
nose==1.3.7
packaging==21.3
passlib==1.7.4
polib==1.1.1
psycopg2==2.9.3
PyJWT==2.4.0
pyparsing==3.0.7
pysolr==3.9.0
python-dateutil==2.8.2
python-magic==0.4.27
pytz==2021.3
pytz-deprecation-shim==0.1.0.post0
PyUtilib==6.0.0
PyYAML==6.0
redis==4.1.4
requests==2.28.1
rq==1.11.0
simplejson==3.17.6
six==1.16.0
SQLAlchemy==1.4.41
sqlalchemy2-stubs==0.0.2a27
sqlparse==0.4.2
tomli==2.0.1
typing_extensions==4.3.0
tzdata==2022.1
tzlocal==4.2
urllib3==1.26.9
uWSGI==2.0.21
watchdog==2.1.6
webassets==2.0
webencodings==0.5.1
Werkzeug==3.0.1
wrapt==1.14.0
WTForms==3.0.1
zipp==3.7.0
zope.interface==5.4.0
Solution
If you do follow Installing CKAN from source, the current process involves the 2.9 tag.
pip install -e 'git+https://github.com/ckan/[email protected]#egg=ckan[requirements]'
However, PR 7967 ("2023-12 dependency update(Flask v3)") and commit 3816367 are yet to be released.
So try, for testing, the latest from master
instead:
pip install -e 'git+https://github.com/ckan/ckan.git@master#egg=ckan[requirements]'
That would include an updated Flask.
Answered By - VonC
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.