Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with read-only resources #59

Closed
anibalpacheco opened this issue Oct 30, 2013 · 9 comments
Closed

Error with read-only resources #59

anibalpacheco opened this issue Oct 30, 2013 · 9 comments

Comments

@anibalpacheco
Copy link

Every task related to datastore raises an error regarding to read-only resources, where is that read-only set?

example:
$ paster datastore_upload test5 -c ../ckan/development.ini
2013-10-30 16:41:43,036 DEBUG [ckanext.archiver.plugin] Notified of resource event: 2eaa3568-8442-4228-923e-1af417dd869e
2013-10-30 16:41:43,036 DEBUG [ckanext.archiver.plugin] Ignoring resource event because operation is: changed
2013-10-30 16:41:44,260 WARNI [root] Resource downloaded: id=2eaa3568-8442-4228-923e-1af417dd869e url=u'http://localhost:5000/storage/f/2013-10-30T18%3A40%3A50.898Z/201212-1.csv' cache_filename=/tmp/tmp_wm11j length=4112 hash=bd185413696e07808f20e8d0a03c5fadd4d42977
2013-10-30 16:41:44,312 ERROR [root] {'read-only': ['Cannot edit read-only resource. Either pass"force=True" or change url-type to "datastore"']}

@ilkosta
Copy link

ilkosta commented Nov 4, 2013

+1

@amercader
Copy link
Member

@anibalpacheco @ilkosta What version of CKAN and the datastorer are you using?
I can't seem to find this message anywhere.
@kindly does this ring a bell? Is it because of the datastorer not working on recent CKAN versions?

@anibalpacheco
Copy link
Author

@amercader master branch on both

@ilkosta
Copy link

ilkosta commented Nov 12, 2013

@amercader master branch on both, just pulled from git and recreated databases

@amercader
Copy link
Member

I don't think that this extension works any more with current CKAN master. Its functionality is being moved to the datapusher, see here for details:

https://github.com/okfn/ckan/wiki/Viewing-Resource-Data#current-plans

@kindly
Copy link
Contributor

kindly commented Nov 13, 2013

This should be a simple fix to the extension, by adding force=True here.
https://github.com/okfn/ckanext-datastorer/blob/master/ckanext/datastorer/tasks.py#L136

i.e
request = {'resource_id': resource['id'],
'fields': [dict(id=name, type=typename) for name, typename in zip(headers, guessed_type_names)],
'records': data, 'force':True}

could someone with a working setup test this for me?

@anibalpacheco
Copy link
Author

@kindly Didn't work for me, same errors.

@anibalpacheco
Copy link
Author

@amercader Tried the datapusher but it's not clear how it works, I could post a job perfectly, ¿but then?

@kindly
Copy link
Contributor

kindly commented Nov 21, 2013

@anibalpacheco @ilkosta

This has been fixed in ckanext-datastorer master now cd68d60. Nonetheless, we are trying to convert people over to the datapusher for the next release. New docs for this are here.

http://datapusher.readthedocs.org/en/latest/

@kindly kindly closed this as completed Nov 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants