Opened 7 years ago

Closed 10 months ago

#8772 closed defect (wontfix)

Trying to create pie graph of tickets that have been created within the last month

Reported by: johannjc137@… Owned by: aviram
Priority: normal Component: TicketChartsMacro
Severity: normal Keywords: query
Cc: Trac Release: 0.11


I have tried both

TicketChart(type = pie, factor = status, query=time="04/05/11..05/05/11", height=600, width=800)?

TicketChart(type = pie, factor = status, query=time="04/05/11".."05/05/11", height=600, width=800)?

and I see the error

Error: Macro TicketChart(type = pie, factor = status, query=time="04/05/11..05/05/11", height=600, width=800) failed 'NoneType' object has no attribute 'tz'

I can create a report using the same query

Here is the output from the log file

2011-05-06 09:33:14,618 Trac[formatter] ERROR: Macro TicketChart(type = pie, factor = owner, query=time="04/05/11".."05/05/11", height=600, width=800) failed: 
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/wiki/", line 710, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "build/bdist.linux-x86_64/egg/trac/wiki/", line 304, in process
    text = self.processor(text)
  File "build/bdist.linux-x86_64/egg/trac/wiki/", line 291, in _macro_processor
  File "/var/trac/astrobear/plugins/", line 460, in expand_macro
    return create_graph(formatter.req, formatter.env, args)
  File "/var/trac/astrobear/plugins/", line 404, in create_graph
    chart, chart_div_id, additional_html = chart_creation[args['type']](env, db, args)
  File "/var/trac/astrobear/plugins/", line 391, in pie_graph
    return _pie_graph(env, db, args['factor'], query = args.get('query'), title = args.get('title'))
  File "/var/trac/astrobear/plugins/", line 366, in _pie_graph
    ticket_stats = _get_pie_graph_stats(env, db, factor, query)
  File "/var/trac/astrobear/plugins/", line 326, in _get_pie_graph_stats
    sql = _get_query_sql(env, query, required_columns = [factor, ])
  File "/var/trac/astrobear/plugins/", line 180, in _get_query_sql
    sql_format_string, format_string_arguments = query_object.get_sql()
  File "build/bdist.linux-x86_64/egg/trac/ticket/", line 606, in get_sql
    clauses = filter(None, (get_clause_sql(c) for c in self.constraints))
  File "build/bdist.linux-x86_64/egg/trac/ticket/", line 606, in <genexpr>
    clauses = filter(None, (get_clause_sql(c) for c in self.constraints))
  File "build/bdist.linux-x86_64/egg/trac/ticket/", line 590, in get_clause_sql
    for val in v]
  File "build/bdist.linux-x86_64/egg/trac/ticket/", line 491, in get_constraint_sql
    start = get_timestamp(start)
  File "build/bdist.linux-x86_64/egg/trac/ticket/", line 472, in get_timestamp
    return to_utimestamp(parse_date(date,
AttributeError: 'NoneType' object has no attribute 'tz'

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by johannjc137@…

I should also mention that just looking for tickets for one day (ie query=time="05/05/11") produces the same behavior

comment:2 Changed 10 months ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Plugin is deprecated.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain aviram.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.