Modify ↓
Opened 9 years ago
Closed 9 years ago
#12373 closed defect (fixed)
AttributeError: 'NoneType' object has no attribute 'id'
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.12 |
Component: | rendering | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: |
Protect against |
||
Internal Changes: |
Description
From the logs:
2016-02-15 08:54:59,277 Trac[api] WARNING: HTML preview using WikiTextRenderer failed: Traceback (most recent call last): File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/mimeview/api.py", line 802, in render rendered_content, filename, url) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/mimeview/api.py", line 1225, in render content_to_unicode(self.env, content, mimetype)) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1580, in format_to_html return HtmlFormatter(env, context, wikidom).generate(escape_newlines) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1535, in generate escape_newlines) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1317, in format result = re.sub(self.wikiparser.rules, self.replace, line) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1235, in replace replacement = self.handle_match(fullmatch) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1228, in handle_match return external_handler(self, match, fullmatch) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/versioncontrol/web_ui/changeset.py", line 1040, in <lambda> y, z)) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/versioncontrol/web_ui/changeset.py", line 1064, in _format_changeset_link reponame = rm.get_default_repository(formatter.context) File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/versioncontrol/api.py", line 639, in get_default_repository return context.resource.parent.id AttributeError: 'NoneType' object has no attribute 'id'
Attachments (0)
Change History (4)
comment:1 by , 9 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
Milestone: | 1.0.11 → 1.0.12 |
---|
comment:3 by , 9 years ago
comment:4 by , 9 years ago
API Changes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
I'm unsure how this scenario can occur. It's a wiki rendering context with the realm either
browser
orchangeset
. The following change would protect againstAttributeError
:trac/versioncontrol/api.py