[ckan-dev] Datastore error

Maurizio "Graffio" Mazzoneschi graffio at lynxlab.com
Thu Oct 9 09:01:44 UTC 2014


Hello,
is there anyone that can help me to fix the error about datastore?

I've installed from the source (github)

This is how I test the datastore. I've followed the documentation in
http://docs.ckan.org/en/latest/maintaining/datastore.html
curl -X POST http://127.0.0.1:5000/api/3/action/datastore_create -H
"Authorization: 4d9c2123-5d25-4913-96ef-ac20cec1cf67" -d
'{"resource_id": "2039e10a-869a-4da1-a909-0d8ac520f115", "fields": [
{"id": "a"}, {"id": "b"} ], "records": [ { "a": 1, "b": "xyz"}, {"a": 2,
"b": "zzz"} ]}

This is the error:
error": {"__type": "Validation Error", "read-only": ["Cannot edit
read-only resource. Either pass\"force=True\" or change url-type to
\"datastore\"

This is the result of "sudo -u postgres psql -l" after I've run paster
--plugin=ckan datastore set-permissions -c
/etc/ckan/default/development.ini | sudo -u postgres psql (I think there
is a lack of information in documentation about how to set permissions,
I've added -c /etc/ckan/default/development.ini otherwise it didn't work
properly)

   List of databases
             Name             |      Owner       | Encoding |  
Collate   |    Ctype      |             Access privileges             
-----------------------------+------------------+------------+------------+---------------+--------------------------------------------datastore_default       
| ckan_default   | UTF8       | it_IT.UTF-8 | it_IT.UTF-8 |
=Tc/ckan_default                          +
                                   |                        |       
        |                  |                  |
ckan_default=CTc/ckan_default    +
                                   |                        |          
     |                  |                  |
datastore_default=c/ckan_default

This is the settings in development.ini
ckan.datastore.write_url =
postgresql://ckan_default:ckan@localhost/datastore_default
ckan.datastore.read_url =
postgresql://datastore_default:ckan@localhost/datastore_default

Of course I've add the plugin datastore in the development.ini

It's two days that I try to fix the problem and I don't know what else I
can do!
thanks in advance
m


-- 
maurizio "graffio" mazzoneschi
Lynx s.r.l.
http://www.lynxlab.com
http://www.scoop.it/t/graffio
skype: graffio_m





More information about the ckan-dev mailing list