ckan / ckan

CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers catalog.data.gov, open.canada.ca/data, data.humdata.org among many other sites.

Home Page:https://ckan.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Datapusher doesn't work properly.

eemirtekin opened this issue · comments

CKAN version

2.10.4

Describe the bug

I installed ckan 2.10.4 on fresh ubuntu 22.04 and enabled datapusher and datastore with below parameters.

ckan.plugins = activity datastore datapusher

ckan.datastoe.write_url = postgresql://ckan_default:pass@localhost/datastore_default
ckan.datastore.read_url = postgresql://datastore_default:pass@localhost/datastore_default

ckan.datapusher.url = http://127.0.0.1:8800/
ckan.datapusher.api_token = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqddGkiOiJtMHFZU182bzRRaUk0UEFBWmxMb3ktZXhHYTc1RXpmZjE4VmpQdk1LNWtzIiwiaWF0IjoxNzExMTI0NDM3fQ.prhY326iyQ_ixafc7L8n4up2MMFKeQaCrxzDhsOqMdQ

All services except datapusher are running successfully. I get error below.

How can I fix?

Thanks in advance.

spawned uWSGI master process (pid: 12215)
spawned uWSGI worker 1 (pid: 12218, cores: 2)
spawned uWSGI worker 2 (pid: 12219, cores: 2)
spawned uWSGI http 1 (pid: 12220)
/usr/lib/ckan/datapusher/lib/python3.10/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.18) or chardet (5.2.0)/charset_normalizer (2.0.12) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
/usr/lib/ckan/datapusher/lib/python3.10/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.18) or chardet (5.2.0)/charset_normalizer (2.0.12) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
Traceback (most recent call last):
  File "/etc/ckan/datapusher/datapusher.wsgi", line 11, in <module>
    import datapusher.jobs as jobs
  File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 20, in <module>
    import messytables
  File "/usr/lib/ckan/datapusher/lib/python3.10/site-packages/messytables/__init__.py", line 3, in <module>
    from messytables.headers import headers_guess, headers_processor, headers_make_unique
  File "/usr/lib/ckan/datapusher/lib/python3.10/site-packages/messytables/headers.py", line 3, in <module>
    from messytables.core import Cell
  File "/usr/lib/ckan/datapusher/lib/python3.10/site-packages/messytables/core.py", line 2, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
Traceback (most recent call last):
  File "/etc/ckan/datapusher/datapusher.wsgi", line 11, in <module>
    import datapusher.jobs as jobs
  File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 20, in <module>
    import messytables
  File "/usr/lib/ckan/datapusher/lib/python3.10/site-packages/messytables/__init__.py", line 3, in <module>
    from messytables.headers import headers_guess, headers_processor, headers_make_unique
  File "/usr/lib/ckan/datapusher/lib/python3.10/site-packages/messytables/headers.py", line 3, in <module>
    from messytables.core import Cell
  File "/usr/lib/ckan/datapusher/lib/python3.10/site-packages/messytables/core.py", line 2, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***

This is an underlying issue with messytable not being maintained anymore.

You can try to fix it on your end: okfn/messytables#196

We recommend you migrate to either https://github.com/ckan/ckanext-xloader/ or https://github.com/dathere/datapusher-plus which are currently maintained.

We are planning on dropping support for datapusher and recommend those options.