CKAN ERROR preview CSV , but OK for Download

江枫思渺然 提交于 2019-12-11 02:35:39

问题


I have the following error in my local test machine, just instaled. Ckan, datapusher, datastore all in the same machine.

Accesing a csv resource i have the following message; "This resource view is not available at the moment. Click here for more information.

Could not load view: DataProxy returned an error (Data transformation failed. error: An error occured while connecting to the server: Unable to connect to server at URL: http://192.168.146.131/dataset/f2139e6a-7e22-41b1-97c2-51101dcfee2f/resource/015a5fc1-efac-49c8-9aff-82b04b0bdc93/download/MICSV.csv)"

Is a simple CSV for test burt cannot see The URL is ok, i can access the resorce by copy/paste in the navbar. May be some thing in conf. I forget a plugin?

The modified lines in my conf file are:

sqlalchemy.url = postgresql://ckan_default:pass@localhost/ckan_default
ckan.datastore.write_url =     postgresql://ckan_default:pass@localhost/datastore_de

fault ckan.datastore.read_url = postgresql://datastore_default:pass@localhost/datastor e_default

ckan.site_url = http://127.0.0.1
solr_url = http://127.0.0.1:8983/solr
ckan.storage_path = /var/lib/ckan/default
ckan.datapusher.url = http://127.0.0.1:8800
ckan.plugins = stats text_view image_view recline_view datastore datapus       her resource_proxy recline_preview

回答1:


The CSV preview uses the DataProxy, which is a service from the OKF (http://jsonpdataproxy.appspot.com/). This service downloads the CSV and parses its content. In order to work properly the resource must be publicly available. This means your CKAN instance must have a public IP and must be accessible from the internet.

My guess is that 192.168.146.131 is not your public IP, hence it doesn't work. If this is just an internal test system, it wouldn't work. You could run your own local instance of dataproxy.

In the future, I would consider to switch to the DataStore or look at the new Resource Views from >= CKAN 2.3.



来源:https://stackoverflow.com/questions/31327516/ckan-error-preview-csv-but-ok-for-download

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!