Many errors in plugin TracChartMacro - Trac1.0

36 views
Skip to first unread message

Ivanelson Nunes

unread,
May 8, 2013, 8:10:23 PM5/8/13
to trac-...@googlegroups.com
Hello,

My Trac1.0 / Ubuntu / Postgres.

I'm trying to
use the plugin [1]TracChartMacro.

[1] http://trac-hacks.org/wiki/TicketChartsMacro

Found 02 errors:

2013-05-08 20:48:25,537 Trac[formatter] ERROR: Macro TicketChart(type = stacked_bars, key = owner, x_axis = status, height = 400, width = 600) failed:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 765, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 356, in process
    text = self.processor(text)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 343, in _macro_processor
    text)
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 460, in expand_macro
    return create_graph(formatter.req, formatter.env, args)
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 404, in create_graph
    chart, chart_div_id, additional_html = chart_creation[args['type']](env, db, args)
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 308, in stacked_bars_graph
    title = args.get('title'))
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 279, in _stacked_bars_graph
    key_colours[key_value] = COLOURS[i]
IndexError: list index out of range


2013-05-08 21:02:06,537 Trac[formatter] ERROR: Macro TicketChart(type = pie, factor = status, query = milestone="milestone4") failed:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 765, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 356, in process
    text = self.processor(text)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 343, in _macro_processor
    text)
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 460, in expand_macro
    return create_graph(formatter.req, formatter.env, args)
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 404, in create_graph
    chart, chart_div_id, additional_html = chart_creation[args['type']](env, db, args)
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 391, in pie_graph
    return _pie_graph(env, db, args['factor'], query = args.get('query'), title = args.get('title'))
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 366, in _pie_graph
    ticket_stats = _get_pie_graph_stats(env, db, factor, query)
  File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 328, in _get_pie_graph_stats
    cursor.execute(sql)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/db/util.py", line 66, in execute
    return self.cursor.execute(sql)
ProgrammingError: column "milestone4" does not exist
LINE 4: WHERE ((COALESCE(t.milestone,'')="milestone4"))
                                         ^
ProgrammingError: column "milestone4" does not exist



Thank You.

RjOllos

unread,
May 9, 2013, 2:04:38 PM5/9/13
to trac-...@googlegroups.com
Hi ynoslenav,

The plugin was performing string interpolation to prepare the SQL strings, which often causes cross-db compatibility issues. I tried quickly to fix that just now. Please try again with the latest source code.
 

Ivanelson Nunes

unread,
May 9, 2013, 11:30:53 PM5/9/13
to trac-...@googlegroups.com
Hi Rjollos

1. Not raise an SQL exception, but does not render the graph.

2. The remaining errors continue.

3. Others:

TicketChart(type = stacked_
bars, key = owner, x_axis = status, query = milestone="MZOP1", title = Tickets b
y status and owner for milestone1)
stacked_bar_max_y_value
    for x_axis_stats in ticket_stats.itervalues()])
ValueError: max() arg is an empty sequence
 File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 232, in _get_

2013/5/9 RjOllos <rjo...@gmail.com>
 

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RjOllos

unread,
May 13, 2013, 5:21:51 AM5/13/13
to trac-...@googlegroups.com
On Thursday, May 9, 2013 8:30:53 PM UTC-7, ynoslenav wrote:
Hi Rjollos

1. Not raise an SQL exception, but does not render the graph.

2. The remaining errors continue.

3. Others:

TicketChart(type = stacked_
bars, key = owner, x_axis = status, query = milestone="MZOP1", title = Tickets b
y status and owner for milestone1)
stacked_bar_max_y_value
    for x_axis_stats in ticket_stats.itervalues()])
ValueError: max() arg is an empty sequence
 File "/var/trac/projects/claudino/plugins/TicketCharts.py", line 232, in _get_


I haven't seen the error you mention in (3), but I know that the plugin is very difficult to install because it is not properly packages, so I've made a ticket for that as the first task (1). Please follow that ticket if you can, and let's take this off list to see if we can work out the other issues.

This macro may be a suitable short-term solution, but for the long term, it might not be a good solution since I'm not sure that OpenFlashCharts is still being developed. It looks like the last updates were in 2010, unless the repository and website have just moved and I'm not seeing the latest. Assuming we get this working, you might just consider it to be a short-term solution, and maybe the plugin that Olemis provides (2) will be a better long term solution when it is read.

Ivanelson Nunes

unread,
May 13, 2013, 3:57:10 PM5/13/13
to trac-...@googlegroups.com
Hello rjollos,

Yes! Let's continue the Ticket.

Right now, I posted the results the new installation.


@ivanelson
[]s


2013/5/13 RjOllos <rjo...@gmail.com>

--

Steffen Hoffmann

unread,
May 13, 2013, 4:21:30 PM5/13/13
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13.05.2013 21:57, Ivanelson Nunes wrote:
> Hello rjollos,
>
> Yes! Let's continue the Ticket.
>
> Right now, I posted the results the new installation.
>
> https://trac-hacks.org/ticket/6061#comment:17

For what its worth I've reformatted and trimmed your comment down. You
may want to do so in the future (hit preview, until you see only
relevant information, especially when commenting in a reply.

For following-up on this mailing-list thread I strongly suggest to NOT
top-post. This makes information flow much smoother. Thanks for taking care.

Steffen Hoffmann

- --
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGRS0UACgkQ31DJeiZFuHfxAACgjb7dgOrJbBUuuhvq1wbL5TPx
VeIAnRRRn2gvL4Nn1yObajJTW4ZpCbYt
=t2nj
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages