Error cuando el Servidor (Ubuntu 14) no tiene configurado el timezone (RESUELTO)
Closed this issue · 0 comments
mvasquez74 commented
Luego de instalar el CKAN siguiendo la doc
https://github.com/gobabiertoAR/datos.gob.ar/blob/master/docs/01_instalacion_dev.md
Mi Ubunto (una VM) no tenia configurado el timezone .. no me di cuenta hasta que me dio ese error cuando intentaba ver un DataSet.
Error - <class 'pytz.exceptions.UnknownTimeZoneError'>: ''
URL: http://192.99.54.177:5000/dataset/southwark-spend
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/weberror/errormiddleware.py', line 171 in __call__
app_iter = self.application(environ, sr_checker)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/dec.py', line 147 in __call__
resp = self.call_func(req, *args, **self.kwargs)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func
return self.func(req, *args, **kwargs)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/fanstatic/publisher.py', line 234 in __call__
return request.get_response(self.app)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response
application, catch_exc_info=False)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application
app_iter = application(self.environ, start_response)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/dec.py', line 147 in __call__
resp = self.call_func(req, *args, **self.kwargs)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func
return self.func(req, *args, **kwargs)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/fanstatic/injector.py', line 54 in __call__
response = request.get_response(self.app)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response
application, catch_exc_info=False)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application
app_iter = application(self.environ, start_response)
File '/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py', line 389 in inner
result = application(environ, start_response)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/beaker/middleware.py', line 73 in __call__
return self.app(environ, start_response)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/beaker/middleware.py', line 155 in __call__
return self.wrap_app(environ, session_start_response)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/routes/middleware.py', line 131 in __call__
response = self.app(environ, start_response)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 125 in __call__
response = self.dispatch(controller, environ, start_response)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 324 in dispatch
return controller(environ, start_response)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 337 in __call__
res = WSGIController.__call__(self, environ, start_response)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 221 in __call__
response = self._dispatch_call()
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 172 in _dispatch_call
response = self._inspect_call(func)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
result = self._perform_call(func, args)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 60 in _perform_call
return func(**args)
File '/usr/lib/ckan/default/src/ckan/ckan/controllers/package.py', line 390 in read
extra_vars={'dataset_type': package_type})
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 216 in render
loader_class=loader_class)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/templating.py', line 249 in cached_template
return render_func()
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 154 in render_template
return render_jinja2(template_name, globs)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 104 in render_jinja2
return template.render(**extra_vars)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/jinja2/environment.py', line 894 in render
return self.environment.handle_exception(exc_info, True)
File '/usr/lib/ckan/default/src/ckan/ckan/templates/package/read.html', line 3 in top-level template code
{% set pkg = c.pkg_dict %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/package/read_base.html', line 1 in top-level template code
{% extends "package/base.html" %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/package/base.html', line 3 in top-level template code
{% set pkg = c.pkg_dict or pkg_dict %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/page.html', line 1 in top-level template code
{% extends "base.html" %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/base.html', line 103 in top-level template code
{%- block page %}{% endblock -%}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/page.html', line 19 in block "page"
{%- block content %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/page.html', line 22 in block "content"
{% block main_content %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/page.html', line 57 in block "main_content"
{% block primary %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/page.html', line 70 in block "primary"
{% block primary_content %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/page.html', line 90 in block "primary_content"
{% block primary_content_inner %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/package/read.html', line 44 in block "primary_content_inner"
{% block package_additional_info %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/package/read.html', line 45 in block "package_additional_info"
{% snippet "package/snippets/additional_info.html", pkg_dict=pkg %}
File '/usr/lib/ckan/default/src/ckan/ckan/lib/jinja_extensions.py', line 255 in _call
return base.render_snippet(args[0], **kwargs)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 79 in render_snippet
renderer='snippet')
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 216 in render
loader_class=loader_class)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/templating.py', line 249 in cached_template
return render_func()
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 154 in render_template
return render_jinja2(template_name, globs)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 104 in render_jinja2
return template.render(**extra_vars)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/jinja2/environment.py', line 894 in render
return self.environment.handle_exception(exc_info, True)
File '/usr/lib/ckan/default/src/ckan/ckan/templates/package/snippets/additional_info.html', line 11 in top-level template code
{% block package_additional_info %}
File '/usr/lib/ckan/default/src/ckan/ckan/templates/package/snippets/additional_info.html', line 64 in block "package_additional_info"
{% snippet 'snippets/local_friendly_datetime.html', datetime_obj=pkg_dict.metadata_modified %}
File '/usr/lib/ckan/default/src/ckan/ckan/lib/jinja_extensions.py', line 255 in _call
return base.render_snippet(args[0], **kwargs)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 79 in render_snippet
renderer='snippet')
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 216 in render
loader_class=loader_class)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/templating.py', line 249 in cached_template
return render_func()
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 154 in render_template
return render_jinja2(template_name, globs)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 104 in render_jinja2
return template.render(**extra_vars)
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/jinja2/environment.py', line 894 in render
return self.environment.handle_exception(exc_info, True)
File '/usr/lib/ckan/default/src/ckan/ckan/templates/snippets/local_friendly_datetime.html', line 12 in top-level template code
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(datetime_obj, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
File '/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py', line 1025 in render_datetime
datetime_ = _datestamp_to_datetime(datetime_)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py', line 87 in _datestamp_to_datetime
local_tz = tzlocal.get_localzone()
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/tzlocal/unix.py', line 122 in get_localzone
_cache_tz = _get_localzone()
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/tzlocal/unix.py', line 61 in _get_localzone
return pytz.timezone(etctz.replace(' ', '_'))
File '/usr/lib/ckan/default/local/lib/python2.7/site-packages/pytz/__init__.py', line 185 in timezone
raise UnknownTimeZoneError(zone)
UnknownTimeZoneError: ''
Para ver el timezone del servidor:
$: cat /etc/timezone
$: sudo dpkg-reconfigure tzdata
Allí se elige el continente y el pais y luego reinician el CKAN