[ckan-dev] Problem with ckanext-archiver

Luis eltipicoemail at gmail.com
Tue Dec 15 14:55:23 UTC 2015


Hi all,

We have local CKAN instance (2.4) running on Ubuntu 14.04. We have
installed the ckanext-archiver extension and we are experimenting this
issue after executing the following command:

paster --plugin=ckanext-archiver archiver update estaciones-de-servicio
--queue=priority -c /etc/ckan/default/production.ini

Contents of /var/log/celeryd.log:

[2015-12-15 10:07:30,139: ERROR/MainProcess] Task
archiver.update_package[estaciones-de-servicio/a890] raised exception:
AttributeError("'thread._local' object has no attribute 'host'",)
Traceback (most recent call last):
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/execute/trace.py",
line 47, in trace
    return cls(states.SUCCESS, retval=fun(*args, **kwargs))
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/app/task/__init__.py",
line 247, in __call__
    return self.run(*args, **kwargs)
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/app/__init__.py",
line 175, in run
    return fun(*args, **kwargs)
  File
"/usr/lib/ckan/default/src/ckanext-archiver/ckanext/archiver/tasks.py",
line 146, in update_package
    _update_search_index(package_id, log)
  File
"/usr/lib/ckan/default/src/ckanext-archiver/ckanext/archiver/tasks.py",
line 160, in _update_search_index
    package = toolkit.get_action('package_show')(context_, {'id':
package_id})
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 429,
in wrapped
    result = _action(context, data_dict, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/action/get.py", line
1019, in package_show
    package_dict = model_dictize.package_dictize(pkg, context)
  File
"/usr/lib/ckan/default/src/ckan/ckan/lib/dictization/model_dictize.py",
line 265, in package_dictize
    with_package_counts=False)
  File
"/usr/lib/ckan/default/src/ckan/ckan/lib/dictization/model_dictize.py",
line 57, in group_list_dictize
    for group in obj_list]
  File
"/usr/lib/ckan/default/src/ckan/ckan/lib/dictization/model_dictize.py",
line 470, in group_dictize
    qualified=True
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 160, in
url_for_static
    return url_for_static_or_external(*args, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 179, in
url_for_static_or_external
    my_url = _routes_default_url_for(*args, **kw)
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/routes/util.py",
line 257, in url_for
    host = config.host
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/routes/__init__.py",
line 14, in __getattr__
    return getattr(self.__shared_state, name)
AttributeError: 'thread._local' object has no attribute 'host'
Traceback (most recent call last):
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/execute/trace.py",
line 47, in trace
    return cls(states.SUCCESS, retval=fun(*args, **kwargs))
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/app/task/__init__.py",
line 247, in __call__
    return self.run(*args, **kwargs)
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/app/__init__.py",
line 175, in run
    return fun(*args, **kwargs)
  File
"/usr/lib/ckan/default/src/ckanext-archiver/ckanext/archiver/tasks.py",
line 146, in update_package
    _update_search_index(package_id, log)
  File
"/usr/lib/ckan/default/src/ckanext-archiver/ckanext/archiver/tasks.py",
line 160, in _update_search_index
    package = toolkit.get_action('package_show')(context_, {'id':
package_id})
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 429,
in wrapped
    result = _action(context, data_dict, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/action/get.py", line
1019, in package_show
    package_dict = model_dictize.package_dictize(pkg, context)
  File
"/usr/lib/ckan/default/src/ckan/ckan/lib/dictization/model_dictize.py",
line 265, in package_dictize
    with_package_counts=False)
  File
"/usr/lib/ckan/default/src/ckan/ckan/lib/dictization/model_dictize.py",
line 57, in group_list_dictize
    for group in obj_list]
  File
"/usr/lib/ckan/default/src/ckan/ckan/lib/dictization/model_dictize.py",
line 470, in group_dictize
    qualified=True
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 160, in
url_for_static
    return url_for_static_or_external(*args, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 179, in
url_for_static_or_external
    my_url = _routes_default_url_for(*args, **kw)
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/routes/util.py",
line 257, in url_for
    host = config.host
  File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/routes/__init__.py",
line 14, in __getattr__
    return getattr(self.__shared_state, name)
AttributeError: 'thread._local' object has no attribute 'host'

Any ideas on how to solve this?

Thanks for your help,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20151215/9dc4f023/attachment-0002.html>


More information about the ckan-dev mailing list