Modify ↓
Opened 12 years ago
Closed 4 years ago
#11034 closed defect (fixed)
Error when loading admin plugin page
Reported by: | Matt Hess | Owned by: | Pablo |
---|---|---|---|
Priority: | normal | Component: | JqChartMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
We log to syslog on our server and are getting this error:
Apr 24 13:13:25 ts01 ¿<11>Trac[web_ui] ERROR: Unable to render component documentation: #012Traceback (most recent call last):#012 File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/admin/web_ui.py", line 566, in safe_wiki_to_html#012 return format_to_html(self.env, context, text)#012 File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1546, in format_to_html#012 return HtmlFormatter(env, context, wikidom).generate(escape_newlines)#012 File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1501, in generate#012 escape_newlines)#012 File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1244, in format#012 self.handle_code_block(line, block_start_match)#012 File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1134, in handle_code_block#012 processed = self.code_processor.process(code_text)#012 File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 356, in process#012 text = self.processor(text)#012 File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 343, in _macro_processor#012 text)#012 File "/usr/lib/python2.6/site-packages/JQChart-1.0dev_r12975-py2.6.egg/jqplotchart/macro.py", line 316, in expand_macro#012 json_object = json.loads('{' + json_string + '}')#012 File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads#012 return _default_decoder.decode(s)#012 File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode#012 obj, end = self.raw_decode(s, idx=_w(s, 0).end())#012 File "/usr/lib64/python2.6/json/decoder.py", line 336, in raw_decode#012 obj, end = self._scanner.iterscan(s, **kw).next()#012 File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan#012 rval, next_pos = action(m, context)#012 File "/usr/lib64/python2.6/json/decoder.py", line 171, in JSONObject#012 raise ValueError(errmsg("Expecting property name", s, end))#012
Attachments (0)
Change History (4)
comment:1 follow-up: 2 Changed 12 years ago by
comment:2 Changed 12 years ago by
Replying to rjollos:
The traceback looks like it has a bunch of
#012
entries where there should be line breaks. Could you try re-posting it?
Hopefully this is better:
2013-04-24 20:18:56,134 Trac[web_ui] ERROR: Unable to render component documentation: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/admin/web_ui.py", line 566, in safe_wiki_to_html return format_to_html(self.env, context, text) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1546, in format_to_html return HtmlFormatter(env, context, wikidom).generate(escape_newlines) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1501, in generate escape_newlines) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1244, in format self.handle_code_block(line, block_start_match) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 1134, in handle_code_block processed = self.code_processor.process(code_text) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 356, in process text = self.processor(text) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 343, in _macro_processor text) File "/usr/lib/python2.6/site-packages/JQChart-1.0dev_r12975-py2.6.egg/jqplotchart/macro.py", line 316, in expand_macro json_object = json.loads('{' + json_string + '}') File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.6/json/decoder.py", line 336, in raw_decode obj, end = self._scanner.iterscan(s, **kw).next() File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan rval, next_pos = action(m, context) File "/usr/lib64/python2.6/json/decoder.py", line 171, in JSONObject raise ValueError(errmsg("Expecting property name", s, end)) ValueError: Expecting property name: line 1 column 2 (char 2)
comment:4 Changed 12 years ago by
The 'Expecting property name' message looks like as an invalid json in the macro body. I used python json parser, that is somewhat strict in it syntax: you need to put quotes around property names:
{{{ #!JQChart type: "MeterGauge", ... }}}
won't work.
{{{ #!JQChart "type": "MeterGauge", ... }}}
is ok.
I have to improve the error reporting, though ...
Note: See
TracTickets for help on using
tickets.
The traceback looks like it has a bunch of
#012
entries where there should be line breaks. Could you try re-posting it?