ckan / datapusher

A standalone web service that pushes data files from a CKAN site resources into its DataStore
GNU Affero General Public License v3.0
76 stars 152 forks source link

Flask version needs to be below 0.12 #165

Open whelks-chance opened 6 years ago

whelks-chance commented 6 years ago

The standard install from GitHub currently installs the latest version of Flask, currently 1.0.2

This results in the error message

ImportError: No module named ext.login

as due to deprecation in how Flask deals with extensions, this is no longer functional. More info at:

http://flask.pocoo.org/docs/0.12/upgrading/#extension-imports

To solve this, you need Flask maximum version 0.12, achieved by:

pip uninstall flask
pip install flask==0.12
hongjie123 commented 11 months ago

When I run the following command: python3 datapusher/main.py deployment/datapusher_settings.py

The following error occurred: Traceback (most recent call last): File "datapusher/main.py", line 3, in import ckanserviceprovider.web as web File "/home/dhj/.local/lib/python3.8/site-packages/ckanserviceprovider/web.py", line 13, in import flask_login as flogin File "/home/dhj/.local/lib/python3.8/site-packages/flask_login/init.py", line 12, in from .login_manager import LoginManager File "/home/dhj/.local/lib/python3.8/site-packages/flask_login/login_manager.py", line 5, in from flask import _request_ctx_stack ImportError: cannot import name '_request_ctx_stack' from 'flask' (/home/dhj/.local/lib/python3.8/site-packages/flask/init.py)

Using: Python 3.8 Flask==3.0.0

eemirtekin commented 6 months ago

Hi @hongjie123,

I getting the same error. Are there any solutions?

Thanks in advance.

pdelboca commented 6 months ago

@eemirtekin @hongjie123 ckanserviceprovider and CKAN 2.10.3 cannot be run with Flask 3.0.

Flask 3.0 will be supported on the next release of CKAN.

eemirtekin commented 6 months ago

Hello, Ali,

I followed the steps below of CKAN 2.10.3.

https://docs.ckan.org/en/2.10/maintaining/installing/install-from-package.html

According to this page, it is shared that we can install CKAN 2.10.3 on Ubuntu 20.04.

Python 3.8.x version is installed on Ubuntu 20.04.

In what environment can I successfully configure CKAN? How can I downgrade Flask? Which version should I use?

I just performed the same installation on clean Ubuntu 22.04, and I got the same error again.

Thank you very much for your reply.

Emrah