On Thu, 2009-10-15 at 14:47 -0500, Olemis Lang wrote:
> .. [1] Preparing your data to be compatible with GViz wire protocol
>
> (https://opensvn.csie.org/traccgi/swlcu/wiki/En/Devel/TracGViz/RawData)
I have been trying to get tracgviz to do a simple table of data on my
wiki page. I only get a square and then red text that it has timed out.
My wiki text is:
[[iGoogleGadget(url=http://www.google.com/ig/modules/simple-table.xml,
_table_query_url=[raw-attachment:wiki:transducer/inclinometer:LSOC-0105-90_SN0611344_20090305.json],
title=´LSOC-0105-90_SN0611344_20090305', _table_query_refresh_interval=30000,
width=600, height=400)]]
all on one line.
The trac log contains this:
Trac[web_ui] INFO: IG: Gadget border store
<tracgviz.ig.db.DefaultBordersRepository object at 0xb8b8e90c>
Trac[formatter] ERROR: Macro
iGoogleGadget(url=http://www.google.com/ig/modules/simple-table.xml,
_table_query_url=[raw-attachment:wiki:transducer/inclinometer:LSOC-0105-90_SN0611344_20090305.json],
title=´LSOC-0105-90_SN0611344_20090305', _table_query_refresh_interval=30000,
width=600, height=400) failed:
Traceback (most recent call last):
File
"/usr/lib/python2.5/site-packages/Trac-0.12multirepos-py2.5.egg/trac/wiki/formatter.py",
line 494, in _macro_formatter
return macro.process(args, in_paragraph=True)
File
"/usr/lib/python2.5/site-packages/Trac-0.12multirepos-py2.5.egg/trac/wiki/formatter.py",
line 192, in process
text = self.processor(text)
File
"/usr/lib/python2.5/site-packages/Trac-0.12multirepos-py2.5.egg/trac/wiki/formatter.py",
line 179, in _macro_processor
text)
File "build/bdist.linux-i686/egg/tracgviz/ig/wiki.py", line 200, in
expand_macro
return self.do_expand_macro(formatter, args)
File "build/bdist.linux-i686/egg/tracgviz/ig/wiki.py", line 190, in
do_expand_macro
urlencode(gadget_params), ''])
File "/usr/lib/python2.5/urllib.py", line 1251, in urlencode
v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in
position 0: ordinal not in range(128)
I think it must be complaining about my data file. Which is attached. I
think it looks ok.
I have tried many alternatives, but I do not get past this. The only
things I can see are different in my try is (1) the attachment is on a
wiki page with a name like transducer/inclinometer, or (2) my json file
has tabs. But the docs imply white space is allowed.
So I am guessing it is too obvious so I do not see the problem.
Help!
--
Roger Oberholtzer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---
google.visualization.Query.setResponse({
'version':'0.5', 'reqId':'0', 'status':'ok',
'table': {
cols: [
{id:'A',label:'Tilt (degrees)',type:'number'},
{id:'B',label:'Input (sin)',type:'number'},
{id:'C',label:'Output (V)',type:'number'},
{id:'D',label:'Liner reg. (V)',type:'number'},
{id:'E',label:'Nom. output (V)',type:'number'}
],
rows: [
{c:[{v:90},{v:1.0000},{v:5.0000},{v:4.9978},{v: 5.0000}]},
{c:[{v:53},{v:0.7986},{v:3.9920},{v:3.9914},{v: 3.9932}]},
{c:[{v:37},{v:0.6018},{v:3.0070},{v:3.0077},{v: 3.0091}]},
{c:[{v:24},{v:0.4067},{v:2.0320},{v:2.0327},{v: 2.0337}]},
{c:[{v:12},{v:0.2079},{v:1.0390},{v:1.0390},{v: 1.0396}]},
{c:[{v:0},{v:0.0000},{v:-0.0010},{v:-0.0001},{v:0.0000}]},
{c:[{v:-12},{v:-0.2079},{v-1.0400},{v:-1.0393},{v:-1.0396}]},
{c:[{v:-24},{v:-0.4067},{v:-2.0340},{v:-2.0330},{v:-2.0337}]},
{c:[{v:-37},{v:-0.6018},{v:-3.0090},{v:-3.0080},{v:-3.0091}]},
{c:[{v:-53},{v:-0.7986},{v:-3.9950},{v:-3.9917},{v:-3.9932}]},
{c:[{v:-90},{v:-1.0000},{v:-4.9950},{v:-4.9981},{v:-5.0000}]}
]
}
});