Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown - IndexError: list index out of range #2811

Closed
pwalsh opened this issue Dec 23, 2015 · 1 comment
Closed

Markdown - IndexError: list index out of range #2811

pwalsh opened this issue Dec 23, 2015 · 1 comment

Comments

@pwalsh
Copy link
Member

pwalsh commented Dec 23, 2015

Background

I'm seeing a range of simple exceptions coming out of datahub.io (running CKAN 2.4). These errors are not critical, but should be addressed and are probably easy "good for contribution" tasks.

Browser: Googlebot 2.1
URL: http://datahub.io/dataset/nalt

Issue

not sure this is a ckan issue, but looks like it is as the markdown lib is called from the core ckan lib.

IndexError: list index out of range
  File "raven/middleware.py", line 35, in __call__
    iterable = self.application(environ, start_response)
  File "webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "fanstatic/publisher.py", line 234, in __call__
    return request.get_response(self.app)
  File "webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "fanstatic/injector.py", line 54, in __call__
    response = request.get_response(self.app)
  File "webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "ckan/config/middleware.py", line 389, in inner
    result = application(environ, start_response)
  File "beaker/middleware.py", line 73, in __call__
    return self.app(environ, start_response)
  File "beaker/middleware.py", line 155, in __call__
    return self.wrap_app(environ, session_start_response)
  File "routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "pylons/wsgiapp.py", line 125, in __call__
    response = self.dispatch(controller, environ, start_response)
  File "pylons/wsgiapp.py", line 324, in dispatch
    return controller(environ, start_response)
  File "ckan/lib/base.py", line 338, in __call__
    res = WSGIController.__call__(self, environ, start_response)
  File "pylons/controllers/core.py", line 221, in __call__
    response = self._dispatch_call()
  File "pylons/controllers/core.py", line 172, in _dispatch_call
    response = self._inspect_call(func)
  File "pylons/controllers/core.py", line 107, in _inspect_call
    result = self._perform_call(func, args)
  File "ckan/controllers/package.py", line 424, in read
    extra_vars={'dataset_type': package_type})
  File "ckan/lib/base.py", line 217, in render
    loader_class=loader_class)
  File "pylons/templating.py", line 249, in cached_template
    return render_func()
  File "ckan/lib/base.py", line 155, in render_template
    return render_jinja2(template_name, globs)
  File "ckan/lib/base.py", line 104, in render_jinja2
    return template.render(**extra_vars)
  File "jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/srv/app/src/ckanext-disqus/ckanext/disqus/templates/package/read.html", line 1, in top-level template code
    {% ckan_extends %}
  File "/srv/app/src/ckanext-datahub/ckanext/datahub/templates/package/read.html", line 1, in top-level template code
    {% ckan_extends %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/package/read.html", line 3, in top-level template code
    {% set pkg = c.pkg_dict %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/package/read_base.html", line 1, in top-level template code
    {% extends "package/base.html" %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/package/base.html", line 3, in top-level template code
    {% set pkg = c.pkg_dict or pkg_dict %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/page.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/srv/app/src/ckanext-geoview/ckanext/geoview/templates/base.html", line 1, in top-level template code
    {% ckan_extends %}
  File "/srv/app/src/ckanext-datahub/ckanext/datahub/templates/base.html", line 1, in top-level template code
    {% ckan_extends %}
  File "/srv/app/src/ckanext-googleanalytics/ckanext/googleanalytics/templates/base.html", line 1, in top-level template code
    {% ckan_extends %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/base.html", line 103, in top-level template code
    {%- block page %}{% endblock -%}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/page.html", line 19, in block "page"
    {%- block content %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/page.html", line 22, in block "content"
    {% block main_content %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/page.html", line 48, in block "main_content"
    <div class="row wrapper{% block wrapper_class %}{% endblock %}{% if self.secondary()|trim == '' %} no-nav{% endif %}">
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/page.html", line 112, in block "secondary"
    {% block secondary_content %}{% endblock %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/package/read_base.html", line 53, in block "secondary_content"
    {% block package_organization %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/package/read_base.html", line 56, in block "package_organization"
    {% snippet "snippets/organization.html", organization=org, has_context_title=true %}
  File "ckan/lib/jinja_extensions.py", line 255, in _call
    return base.render_snippet(args[0], **kwargs)
  File "ckan/lib/base.py", line 79, in render_snippet
    renderer='snippet')
  File "ckan/lib/base.py", line 217, in render
    loader_class=loader_class)
  File "pylons/templating.py", line 249, in cached_template
    return render_func()
  File "ckan/lib/base.py", line 155, in render_template
    return render_jinja2(template_name, globs)
  File "ckan/lib/base.py", line 104, in render_jinja2
    return template.render(**extra_vars)
  File "jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/snippets/organization.html", line 20, in top-level template code
    {% block info %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/snippets/organization.html", line 26, in block "info"
    {% block inner %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/snippets/organization.html", line 41, in block "inner"
    {% block description %}
  File "/usr/local/lib/python2.7/site-packages/ckan-2.4.1-py2.7.egg/ckan/templates/snippets/organization.html", line 44, in block "description"
    {{ h.markdown_extract(organization.description, 180) }}
  File "ckan/lib/helpers.py", line 814, in markdown_extract
    plain = RE_MD_HTML_TAGS.sub('', markdown(text))
  File "webhelpers/markdown.py", line 1822, in markdown
    return md.convert(text)
  File "webhelpers/markdown.py", line 1745, in convert
    xml = pp.run(xml)
  File "webhelpers/markdown.py", line 966, in run
    html, safe  = self.stash.rawHtmlBlocks[i]
@kmbn
Copy link
Contributor

kmbn commented Jan 22, 2019

We decided to close old issues that are not actively worked on so that we can focus our effort and attention on issues affecting the current versions of CKAN.

If this issue is still affecting the version of CKAN you're working with now, please feel free to comment or reopen the issue.

If you do reopen this issue, please update it with new details. One reason it might not have been resolved in the past is that it wasn't clear how a contributor could address the issue.

@kmbn kmbn closed this as completed Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants