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

Could not load view: DataProxy returned an error (Data transformation failed. HTTPError: HTTP Error 404: Not Found) #231

Open ghost opened 3 years ago

ghost commented 3 years ago

I am running CKAN 2.9.2 on Ubuntu 20 for a productive instance with https. I am having recently several problems like this one:

Could not load view: DataProxy returned an error (Data transformation failed. HTTPError: HTTP Error 404: Not Found)

when I try to have a csv file visualized in the Data Explorer. This is for a private dataset.

I assume I have to change the options ckan.datapusher.url and/or ckan.datapusher.callback_url_base in the configuration file but I don't know exactly how. I currently have ckan.datapusher.url = http://127.0.0.1:8800/ but I guess this cannot work when you have an instance with a registered domain.

Could I get help with this? I know that I can make it work by making the dataset public, but I would be more interested in having it working for private datasets.

JOCKEEY commented 3 years ago

Did you solved this ??

ghost commented 2 years ago

Unfortunately not.

adamjennison commented 2 years ago

I "think" this is because urllib3 in the python3 install on unbuntu 20.04 is version 1.25.8 while the urllib3 used in this CKAN bundle is 1.26.6 Same issue with chardet too (i think) I'm looking at how to upgrade the base version of urllib3 to bring it inline with CKAN's - so far I'm failing but will report back if I'm successful and it sorts out this issue.

adamjennison commented 2 years ago

Right - it's a pain.. but.. I followed this page: https://www.claudiokuenzler.com/blog/1114/urllib3-or-chardet-doesnt-match-a-supported-version-check-esxi-hardware

Removed via apt and installed the newer versions via pip.. still no luck. Then looked in /usr/lib/ckan/datapusher/lib/python3.8/site-packages/requests/init.py and changed to the following as it was looking for older versions than were installed :-|

Reloaded supervisorctl etc and though it took a while my datapusher is now working and I'm getting a view on a csv I hope it helps..


    # Check urllib3 for compatibility.
    major, minor, patch = urllib3_version  # noqa: F811
    major, minor, patch = int(major), int(minor), int(patch)
    # urllib3 >= 1.21.1, <= 1.25
#    assert major == 1
#    assert minor >= 21
#    assert minor <= 25

    assert major == 1
    assert minor >= 25
 #   assert minor <= 25

    # Check chardet for compatibility.
    major, minor, patch = chardet_version.split('.')[:3]
    major, minor, patch = int(major), int(minor), int(patch)
    # chardet >= 3.0.2, < 3.1.0
 #   assert major == 3
 #   assert minor < 1
 #   assert patch >= 2

    assert major == 4
#    assert minor < 1
 #   assert patch >= 2
jdkruzr commented 2 years ago

I tried the above and am still having the same issue with CKAN 2.9 on Focal Fossa. It also works for me if I make the dataset public.