[ckan-dev] package_update throws error when adding extra field

Kirstein, Fabian fabian.kirstein at fokus.fraunhofer.de
Mon Feb 18 10:13:03 UTC 2013


Hi!
I extracted the data parameter and you were right,  one value is a list.

('extras',): [{'value': u'', 'key': 'pr_languages'}, {'value': u'', 'key': 'release'}, {'value': u'', 'key': 'updated'}],

It seems that the use of IDataSetForm somehow causes that. I really need a workaround for that
Because using the action API in my custom controller is crucial.

Thanks a lot.
Fabian

-----Ursprüngliche Nachricht-----
Von: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] Im Auftrag von Ian Ward
Gesendet: Montag, 4. Februar 2013 14:09
An: CKAN Development Discussions
Betreff: Re: [ckan-dev] package_update throws error when adding extra field

On Thu, Jan 31, 2013 at 8:53 AM, Kirstein, Fabian <fabian.kirstein at fokus.fraunhofer.de> wrote:
> File 
> '/home/fki/pyenv/src/ckan/ckan/lib/navl/dictization_functions.py', 
> line
> 394 in unflatten
>
>   current_pos = current_pos[key]
>
> IndexError: list index out of range

This error suggests current_pos has become a string or list when the code is expecting a dict.  It would be interesting to see the value of the data parameter to the unflatten function when it fails this way.

Ian

_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev




More information about the ckan-dev mailing list