[ckan-dev] insertion of datasets
rucha pandav
rucha.pandav at gmail.com
Fri Dec 9 03:01:34 UTC 2011
Hi,
I have just installed ckan and I am facing some problems while inserting
data.
Please let me know the exact procedure to insert datasets using web
interface and harvest methods.
I tried to execute the python example given in the package installation and
I am getting some errors.
The example is:
import ckanclient
# Instantiate the CKAN client.
ckan = ckanclient.CkanClient(api_key=my_api_key,
base_location="http://myckaninstance.com/api")
# Describe the dataset.
dataset_entity = {
'name': my_dataset_name,
'url': my_dataset_url,
'download_url': my_dataset_download_url,
'tags': my_dataset_keywords,
'notes': my_dataset_long_description,
}
# Register the dataset.
ckan.package_register_post(dataset_entity)
The errors which I get are:
Traceback (most recent call last):
File "script1.py", line 13, in <module>
ckan.package_register_post(dataset_entity)
File "/usr/local/lib/python2.6/dist-packages/ckanclient/__init__.py",
line 374, in package_register_post
self.open_url(url, data, headers)
File "/usr/local/lib/python2.6/dist-packages/ckanclient/__init__.py",
line 348, in open_url
raise CkanApiError(self.last_message)
ckanclient.CkanApiError: [Errno -2] Name or service not known
Please can you let me know what is the problem.
Kind Regards,
Rucha.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20111209/7eb0a207/attachment.html>
More information about the ckan-dev
mailing list