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
77 stars 153 forks source link

Datapusher incompatible with Werkzeug 2.1.0 #247

Closed sischall closed 2 years ago

sischall commented 2 years ago

Since the new release of Werkzeug 2.1.0, the datapusher does not work anymore. In the log of the datapusher, you can see the following error: ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security' (/usr/lib/python3.8/site-packages/werkzeug/security.py) Looking in the release notes of werkzeug 2.1.0, https://werkzeug.palletsprojects.com/en/2.1.x/changes/, we can see, that the function 'safe_str_cmp' was removed. A quick way to fix this, is to continue using version 2.0.x of werkzeug. This e.g. given can be done by uninstalling Werkzeug 2.1.0 and manually installing Werkzeug 2.0.x.

I start the datapusher in version 0.0.17 with docker as follows: https://github.com/okfn/docker-ckan/blob/master/datapusher/Dockerfile

Reproduce this issue:

tomeksabala commented 2 years ago

Today I've also encountered the issue. Our tmp fix was to patch the requirements.txt with:

# newer versions of Werkzeug not compatilbe with ckanserviceprovider
Werkzeug~=2.0.0
amercader commented 2 years ago

The latest Datapusher version (0.0.18) should address that, can you check if it works for you @tomeksabala @sischall ? thanks