Modify

Opened 17 years ago

Closed 17 years ago

#2964 closed defect (invalid)

plugin throws error on YAML detail.message

Reported by: Karl DeBisschop Owned by: malsmith
Priority: normal Component: GanttChartPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

The detail from YAML did not include a message attribute, so I could not diagnose the ultimate error.

[udebika@usbost-fenservi trac-hacks]$ svn diff ganttchartplugin/0.11/ Index: ganttchartplugin/0.11/gantt/gantt.py =================================================================== --- ganttchartplugin/0.11/gantt/gantt.py (revision 3567) +++ ganttchartplugin/0.11/gantt/gantt.py (working copy) @@ -201,7 +201,9 @@

mstart,mend = self.process_dates(data) self.draw_chart(data,mstart,mend,img_path,80,20,False)

except yaml.YAMLError, detail :

  • msg = "Data Loading Error: " + detail.message

+ msg = "Data Loading Error: " + if hasattr(detail, 'message'): + msg = msg + detail.message

if hasattr(detail, 'problem_mark'):

mark = detail.problem_mark msg = msg + "<br />Error position: (%s:%s)" % (mark.line+1, mark.column+1)

Attachments (0)

Change History (1)

comment:1 Changed 17 years ago by Karl DeBisschop

Resolution: invalid
Status: newclosed

I goofed in submitting this against 0.10 - resubmitted against 0.11, so close this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain malsmith.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.