[allura:tickets] #6342 Errors in ForgeLinkPattern parsing

2017-10-13 Thread Kenton Taylor
- **status**: review --> closed
- **Comment**:

Merged.



---

** [tickets:#6342] Errors in ForgeLinkPattern parsing**

**Status:** closed
**Milestone:** unreleased
**Created:** Thu Jun 06, 2013 10:21 PM UTC by Dave Brondsema
**Last Updated:** Thu Oct 12, 2017 04:47 PM UTC
**Owner:** Dave Brondsema



  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



---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed 
to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] #6342 Errors in ForgeLinkPattern parsing

2017-10-12 Thread Dave Brondsema



---

** [tickets:#6342] Errors in ForgeLinkPattern parsing**

**Status:** review
**Milestone:** unreleased
**Created:** Thu Jun 06, 2013 10:21 PM UTC by Dave Brondsema
**Last Updated:** Tue Feb 17, 2015 07:54 AM UTC
**Owner:** Dave Brondsema



  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



---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed 
to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.