[ECODP-dev] api error on new version v1.8

John Glover john.glover at okfn.org
Fri Jun 21 08:55:18 UTC 2013


Hi Bert,

The bug with CKAN not correctly validating the data in this function has
been fixed and is now in our Github repository.

Regards,
John


On 21 June 2013 10:35, John Glover <john.glover at okfn.org> wrote:

> Hi Bert,
>
> I think that there are two things happening here:
>
> 1. There is a bug in the validation part of that function in CKAN which I
> will fix now.
>
> 2. However, your call to this function will return a ValidationError after
> I fix this bug, as I believe that you are calling
> term_translation_update_many with no data (terms to translate). If you are
> making this call yourself then you should check that there are actually
> terms that need to be translated before calling the function. If you are
> calling this through a CKAN paster command then let me know which one and I
> will fix it.
>
> Regards,
> John
>
>
> On 21 June 2013 09:18, Bert Van Nuffelen <bert.van.nuffelen at tenforce.com>wrote:
>
>> Hi Darwin,
>>
>> Can you please validate the next url on v1.8? this throws errors on
>> our acceptance. Without this the rdf2ckan ingestion pipe is broken.
>>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] URL:
>> http://localhost:8008/data/api/action/term_translation_update_many
>>
>>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] URL:
>> http://localhost:8008/data/api/action/ter
>> m_translation_update_many
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>> '/applications/ecodp/users/ecodp/ckan/ecp
>> ortal/lib/python2.6/site-packages/weberror/errormiddleware.py', line
>> 162 in __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   app_iter =
>> self.application(environ, sr_chec
>> ker)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>> '/applications/ecodp/users/ecodp/ckan/ecp
>> ortal/lib/python2.6/site-packages/beaker/middleware.py', line 73 in
>> __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   return
>> self.app(environ, start_response)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>> '/applications/ecodp/users/ecodp/ckan/ecp
>> ortal/lib/python2.6/site-packages/beaker/middleware.py', line 155 in
>> __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   return
>> self.wrap_app(environ, session_start_response)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/repoze/who/middleware.py',
>> line 87 in __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   app_iter =
>> app(environ, wrapper.wrap_start_response)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/routes/middleware.py',
>> line 131 in __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   response =
>> self.app(environ, start_response)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/pylons/wsgiapp.py',
>> line 125 in __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   response =
>> self.dispatch(controller, environ, start_response)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/pylons/wsgiapp.py',
>> line 324 in dispatch
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   return
>> controller(environ, start_response)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/src/ckan/ckan/controllers/api.py',
>> line 69 in __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   return
>> base.BaseController.__call__(self, environ, start_response)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/pylons/controllers/core.py',
>> line 221 in __call__
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   response =
>> self._dispatch_call()
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/pylons/controllers/core.py',
>> line 172 in _dispatch_call
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   response =
>> self._inspect_call(func)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/pylons/controllers/core.py',
>> line 107 in _inspect_call
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   result =
>> self._perform_call(func, args)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/lib/python2.6/site-packages/pylons/controllers/core.py',
>> line 60 in _perform_call
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   return
>> func(**args)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/src/ckan/ckan/controllers/api.py',
>> line 177 in action
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   result =
>> function(context, request_data)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] File
>>
>> '/applications/ecodp/users/ecodp/ckan/ecportal/src/ckan/ckan/logic/action/update.py',
>> line 724 in term_translation_update_many
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   return
>> {'success': '%s rows updated' % (num + 1)}
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> UnboundLocalError: local variable 'num' referenced before assignment
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] WSGI Variables
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1] --------------
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   application:
>> <beaker.middleware.CacheMiddlew
>> are object at 0x7f621e55c910>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   beaker.cache:
>> <beaker.cache.CacheManager obj
>> ect at 0x7f621e55cb90>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> beaker.get_session: <bound method SessionMid
>> dleware._get_session of <beaker.middleware.SessionMiddleware object at
>> 0x7f621e55cbd0>>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> beaker.session: {'_accessed_time': 137179859
>> 4.45628, '_creation_time': 1371798594.45628}
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.application_group: 'odp.tenforce.co
>> m:8008|/data'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.callable_object: 'application'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.handler_script: ''
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.input_chunked: '0'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.listener_host: ''
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.listener_port: '8008'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.process_group: 'ecodp'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.request_handler: 'wsgi-script'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> mod_wsgi.script_reloading: '1'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   mod_wsgi.version:
>> (3, 2)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   paste.cookies:
>> (<SimpleCookie: >, '')
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> paste.registry: <paste.registry.Registry obj
>> ect at 0x7f621e935b10>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> paste.throw_errors: True
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> pylons.action_method: <bound method ApiContr
>> oller.action of <ckan.controllers.api.ApiController object at
>> 0x7f621e92e450>>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> pylons.controller: <ckan.controllers.api.Api
>> Controller object at 0x7f621e92e450>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> pylons.environ_config: {'session': 'beaker.session', 'cache':
>> 'beaker.cache'}
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   pylons.pylons:
>> <pylons.util.PylonsContext object at 0x7f621e92eed0>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> pylons.routes_dict: {'action': u'action', 'controller': u'api', 'ver':
>> 3, 'logic_function': u'term_translation_update_many'}
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> pylons.status_code_redirect: True
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> repoze.who.api: <repoze.who.api.API object at 0x7f621e935810>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> repoze.who.logger: <logging.Logger instance at 0x7f621e55f518>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> repoze.who.plugins:
>> {'ckan.lib.authenticator:UsernamePasswordAuthenticator':
>> <ckan.lib.authenticator.UsernamePasswordAuthenticator object at
>> 0x7f621e562ad0>, 'friendlyform': <FriendlyFormPlugin 140059392461968>,
>> 'auth_tkt': <AuthTktCookiePlugin 140059392462672>}
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   routes.route:
>> <routes.route.Route object at 0x7f621e3f05d0>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   routes.url:
>> <routes.util.URLGenerator object at 0x7f621e92e550>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> webob._parsed_query_vars: (GET([]), '')
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> webob.adhoc_attrs: {'language': 'en-us'}
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> webob.is_body_seekable: True
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   wsgi process:
>> 'Multi process AND threads (?)'
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> wsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter
>> object at 0x7f621e7604e0>
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]   wsgi.version: (1,
>> 1)
>> [Fri Jun 21 09:09:54 2013] [error] [client 127.0.0.1]
>> wsgiorg.routing_args: (<routes.util.URLGenerator object at
>> 0x7f621e92e550>, {'action': u'action', 'controller': u'api', 'ver': 3,
>> 'logic_function': u'term_translation_update_many'})
>>
>> Bert
>>
>> --
>> Bert Van Nuffelen
>>
>> Semantic Technologies Software Architect at TenForce
>> www.tenforce.be
>>
>> Bert.Van.Nuffelen at tenforce.com
>> Office: +32 (0)16 31 48 60
>> Mobile:+32 479 06 24 26
>> skype: bert.van.nuffelen
>>
>> _______________________________________________
>> Ecodp-dev mailing list
>> Ecodp-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20130621/0b4304bd/attachment.html>


More information about the ecodp-dev mailing list