[ckan-dev] new resource plugin trouble

Maurizio "Graffio" Mazzoneschi graffio at lynxlab.com
Wed Sep 17 13:21:57 UTC 2014


many thanks for your answer Adrià.

I've just installed (this morning) from source. It seems to be 2.3
version (pip install -e 'git+https://github.com/ckan/ckan.git#egg=ckan').

Unluckily the max recursion issue is still alive :(

Was the bug fixed reported in master branch?

Il 17/09/2014 14:42, Adrià Mercader ha scritto:
> Hi Maurizio,
>
> The way of registering your action is correct. The max recursion issue
> is a bug that was fixed a while ago [1]
> If you are using CKAN 2.2, switch to the latest 2.2.1 branch, which has the fix.
>
> See your separate email for comments on IResourceUpload
>
> Adrià
>
>
> [1] https://github.com/ckan/ckan/pull/1583
>
> On 16 September 2014 17:05, Maurizio "Graffio" Mazzoneschi
> <graffio at lynxlab.com> wrote:
>> Hello all,
>> I'm writing a plugin to modify the behaviour of "add resource" function,
>> in order to apply some transformation to the uploaded file.
>>
>> I'm having some trouble. Any help is welcome!
>>
>> I've used  get_actions and logic.get_action('resource_create')(context,
>> data_dict)
>>
>> but ckan give back this error message:
>> RuntimeError: maximum recursion depth exceeded
>>
>> I've tried also to use after_upload method , but CKAN seems ignore the
>> method
>>
>> Someone can help me?
>>
>>
>> This is my code:
>>
>>     def get_actions(self):
>>         return {
>>             'resource_create': resource_create_FN
>>         }
>>
>> def resource_create_FN(context, data_dict):
>>     #do somethings
>>     return logic.get_action('resource_create')(context, data_dict)
>>
>> --
>> maurizio "graffio" mazzoneschi
>> Lynx s.r.l.
>> http://www.lynxlab.com
>> http://www.scoop.it/t/graffio
>> skype: graffio_m
>>
>>
>> _______________________________________________
>> 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
> _______________________________________________
> 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
>


-- 
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