[ckan-dev] Updating A Dataset's Organization

Vitor Baptista vitor at vitorbaptista.com
Wed May 7 23:18:24 UTC 2014


Hi Todd,

Could you paste the server's logs?

Cheers,


2014-05-07 17:08 GMT-03:00 Todd Bleess <TBleess at drcog.org>:

> I’ve been attempting to use python and the API, specifically
> package_owner_org_update, to change the organization to which dataset’s
> belong in CKAN but I keep getting HTTP Error 500: Internal Server Error.
> I’m using a sysadmin api key so that shouldn’t be the problem (if I use a
> non-sysadmin key I get  HTTP Error 403: Forbidden instead).
>
>
>
> import urllib2
>
> import urllib
>
> import json
>
>
>
> data_string = urllib.quote(json.dumps({'id': 'bike', 'organization_id':
> 'denver'}))
>
>
>
> request = urllib2.Request(
>
>     'http://{url}/api/3/action/package_owner_org_update')
>
>
>
> request.add_header('Authorization', 'xxx')
>
>
>
> response = urllib2.urlopen(request, data_string)
>
>
>
> I get the python HTTP error at this point. I know I have a dataset called
> bike and an organization called denver. I’ve tried it using the id string
> instead of name as well with similar results. I think I’m missing something
> fairly simple here.
>
>
>
> *Todd Bleess *| GIS Specialist | Admin & Finance
>
> *Direct* *303-480-6797 <303-480-6797>* | *Fax* *303-480-6790
> <303-480-6790> *| *tbleess at drcog.org <tbleess at drcog.org>*
>
>
>
> *[image: 2011-DRCOG-New-Email-Signature3]* <http://www.drcog.org/>
>
>
>
> [image: cid:image006.jpg at 01CF5E3B.604DB320] <https://mywaytogo.org/#/>
>
> *Check out the new **MyWaytoGo <https://mywaytogo.org/#/>** website for a
> brand-new look at commuting.*
>
> *[image: facebook]*<http://www.facebook.com/Denver.Regional.Council.of.Governments>
> *[image: twitter]* <https://twitter.com/DRCOGorg>   [image: linkedin]<http://www.linkedin.com/company/denver-regional-council-of-governments?trk=cp_followed_name_denver-regional-council-of-governments>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>


-- 

Vítor Baptista

Developer  |  http://vitorbaptista.com |
LinkedIn<http://www.linkedin.com/in/vitorbaptista>|
@vitorbaptista <http://twitter.com/vitorbaptista>

The Open Knowledge Foundation <http://okfn.org>

*Empowering through Open Knowledge*

http://okfn.org/  |  @okfn <http://twitter.com/okfn>  |  OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140507/29dcdfdf/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1830 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140507/29dcdfdf/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 2770 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140507/29dcdfdf/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2696 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140507/29dcdfdf/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 4623 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140507/29dcdfdf/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 8239 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140507/29dcdfdf/attachment-0003.gif>


More information about the ckan-dev mailing list