[ckan-dev] ckanext-dgu loaders depend on ckan

Stefano Costa stefano.costa at okfn.org
Mon Mar 7 16:34:28 UTC 2011


Il giorno lun, 07/03/2011 alle 15.22 +0000, Rufus Pollock ha scritto:
> 
> As David Read says, the much better place to start is the loaders
> based on ckanclient which can be found here:
> 
> <https://bitbucket.org/okfn/ckanext/src/e7411da05865/bin/>
> 
> E.g. here's the loader I wrote last summer for it.ckan.net stuff (not
> sure if it is up to date so YMMV!):
> 
> <https://bitbucket.org/okfn/ckanext/src/e7411da05865/bin/ckanload-italy-nexa>

That's exactly what I was looking for! It appears to be in good shape,
but it's not working on the API side apparently. I'm trying to test it
before filling it.ckan.net with rubbish (google account omitted)

        python nexa.py
        --ckan-api-key=f9bdbf5a-6f2b-459d-ac95-2dbb8b944371 \
        --ckan-api-location=http://test.ckan.net/api \
        --google-spreadsheet-key=0Ann4Ii6V2DlwdHVBemFTX3c3aDdNNW9KN003YzQwbFE 
        
        [lots of stuff here]
        
        There are 49 metadata packages with titles extracted from the spreadsheet.
        Putting 49 packages on CKAN running at http://test.ckan.net/api
        
        Traceback (most recent call last):
          File "nexa.py", line 44, in <module>
            NexaDataLoader().run()
          File "/home/steko/code/ckanclient/ckanclient/loaders/base.py", line 105, in run
            self.put_packages_on_ckan()
          File "/home/steko/code/ckanclient/ckanclient/loaders/base.py", line 121, in put_packages_on_ckan
            registered_package = self.ckanclient.package_entity_get(package['name'])
          File "/home/steko/code/ckanclient/ckanclient/__init__.py", line 339, in package_entity_get
            self.open_url(url, headers=headers)
          File "/home/steko/code/ckanclient/ckanclient/__init__.py", line 306, in open_url
            raise CkanApiError(self.last_message)
        ckanclient.CkanApiError: "Not found"
        

> Big +1. We should definitely document the results of this discussion
> on http://wiki.ckan.net -- perhaps on
> http://wiki.ckan.net/Using_the_API or a dedicated page.

Sure, I'll be writing it myself as soon as I get it to work :) In the
meantime I started http://wiki.ckan.net/Package_relationships based on
the previous iteration in this series.

Ciao
steko

-- 
Stefano Costa
Open Knowledge Foundation Italia http://it.okfn.org/
http://okfn.org/ · http://www.opendefinition.org/ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110307/af04446e/attachment-0001.sig>


More information about the ckan-dev mailing list