#6342 Errors in ForgeLinkPattern parsing

forge-backlog
open
nobody
None
nobody
General
None
2013-06-06
2013-06-06
Dave Brondsema
No
  File "/var/local/allura/Allura/allura/command/show_models.py", line 127, in command
    update_refs=self.options.refs)
  File "/var/local/allura/Allura/allura/tasks/index_tasks.py", line 49, in add_artifacts
    link.ref_id for link in find_shortlinks(s['text']) ]
  File "/var/local/allura/Allura/allura/lib/search.py", line 212, in find_shortlinks
    md.convert(text)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/__init__.py", line 292, in convert
    newRoot = treeprocessor.run(root)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/treeprocessors.py", line 289, in run
    text), child)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/treeprocessors.py", line 110, in __handleInline
    data, patternIndex, startIndex)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/treeprocessors.py", line 237, in __applyPattern
    node = pattern.handleMatch(match)
  File "/var/local/allura/Allura/allura/lib/markdown_extensions.py", line 116, in handleMatch
    if 'notfound' in classes and not self.ext._use_wiki:
UnboundLocalError: local variable 'classes' referenced before assignment

Example somewhere in sbg901.arris's content for this:

  File "/var/local/allura/Allura/allura/tasks/index_tasks.py", line 49, in add_artifacts
    link.ref_id for link in find_shortlinks(s['text']) ]
  File "/var/local/allura/Allura/allura/lib/search.py", line 212, in find_shortlinks
    md.convert(text)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/__init__.py", line 292, in convert
    newRoot = treeprocessor.run(root)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/treeprocessors.py", line 289, in run
    text), child)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/treeprocessors.py", line 110, in __handleInline
    data, patternIndex, startIndex)
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/treeprocessors.py", line 237, in __applyPattern
    node = pattern.handleMatch(match)
  File "/var/local/allura/Allura/allura/lib/markdown_extensions.py", line 107, in handleMatch
    el.set('href', self.sanitize_url(self.unescape(href.strip())))
  File "/var/local/env-allura/lib/python2.7/site-packages/Markdown-2.2.0-py2.7.egg/markdown/inlinepatterns.py", line 198, in unescape
    return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text)
TypeError: sequence item 0: expected string or Unicode, Element found

Discussion


Anonymous


Cancel   Add attachments