Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#929 closed defect (fixed)

traceback when trying to create new ticket with 0.8-rc1

Reported by: robdclark@… Owned by: daniel
Priority: normal Milestone: 0.8
Component: ticket system Version: 0.7.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christopher Lenz)

not sure if it matters, I was using the Safari (macosx) web browser. Had no problems with 0.7.1 prior to upgrading.

[[[

Traceback (most recent call last):

File "/sw/lib/python2.3/site-packages/trac/core.py", line 525, in cgi_start

real_cgi_start()

File "/sw/lib/python2.3/site-packages/trac/core.py", line 520, in real_cgi_start

dispatch_request(path_info, args, req, env)

File "/sw/lib/python2.3/site-packages/trac/core.py", line 435, in dispatch_request

module.run()

File "/sw/lib/python2.3/site-packages/trac/Module.py", line 44, in run

self.render()

File "/sw/lib/python2.3/site-packages/trac/Ticket.py", line 298, in render

self.create_ticket()

File "/sw/lib/python2.3/site-packages/trac/Ticket.py", line 290, in create_ticket

tn.notify(ticket, newticket=1)

File "/sw/lib/python2.3/site-packages/trac/Notify.py", line 189, in notify

self.hdf.setValue('email.ticket_props', self.format_props())

File "/sw/lib/python2.3/site-packages/trac/Notify.py", line 245, in format_props

if '\n' in tkt[f]:

TypeError: iterable argument required

]]]

Attachments (0)

Change History (9)

comment:1 by robdclark@…, 19 years ago

hmm, obviously I succeeded in creating a new ticket here, with the same web browser, so that must not be it. Perhaps something wrong with my setup? I did run "trac-admin upgrade" to update the db, and everything else (browsing tickets, etc) seems to work ok.

comment:2 by daniel, 19 years ago

Owner: changed from Jonas Borgström to daniel
Status: newassigned

comment:3 by daniel, 19 years ago

Resolution: fixed
Status: assignedclosed

It seems to be a bug in my code to add custom ticket fields to notification emails.

Fixed in [1060].

comment:4 by robdclark@…, 19 years ago

Resolution: fixed
Status: closedreopened

hmm, now I get:

Traceback (most recent call last):
  File "/sw/lib/python2.3/site-packages/trac/core.py", line 525, in cgi_start
    real_cgi_start()
  File "/sw/lib/python2.3/site-packages/trac/core.py", line 520, in real_cgi_start
    dispatch_request(path_info, args, req, env)
  File "/sw/lib/python2.3/site-packages/trac/core.py", line 435, in dispatch_request
    module.run()
  File "/sw/lib/python2.3/site-packages/trac/Module.py", line 44, in run
    self.render()
  File "/sw/lib/python2.3/site-packages/trac/Ticket.py", line 298, in render
    self.create_ticket()
  File "/sw/lib/python2.3/site-packages/trac/Ticket.py", line 290, in create_ticket
    tn.notify(ticket, newticket=1)
  File "/sw/lib/python2.3/site-packages/trac/Notify.py", line 189, in notify
    self.hdf.setValue('email.ticket_props', self.format_props())
  File "/sw/lib/python2.3/site-packages/trac/Notify.py", line 250, in format_props
    if len(tkt[f]) > width[idx+1]:
TypeError: len() of unsized object

and I get a server error when trying to access the timeline (python seg-faulting):

[Mon Nov 15 21:57:45 2004] [error] Optional function test said: GET /cgi-bin/trac.cgi/timeline HTTP/1.1
[Mon Nov 15 21:57:52 2004] [error] [client xxx.xxx.xxx.xxx] /sw/var/apache2/cgi-bin/trac.cgi: line 2:   520 Segmentation fault      /sw/bin/python2.3 trac_cgi.py
[Mon Nov 15 21:57:52 2004] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: trac.cgi

not sure if this is related?

comment:5 by daniel, 19 years ago

Resolution: fixed
Status: reopenedclosed

Oops, missed that one. Try [1073].

comment:6 by robdclark@…, 19 years ago

Resolution: fixed
Status: closedreopened

hmm, no, no quite

Traceback (most recent call last):
  File "/sw/lib/python2.3/site-packages/trac/core.py", line 525, in cgi_start
    real_cgi_start()
  File "/sw/lib/python2.3/site-packages/trac/core.py", line 520, in real_cgi_start
    dispatch_request(path_info, args, req, env)
  File "/sw/lib/python2.3/site-packages/trac/core.py", line 435, in dispatch_request
    module.run()
  File "/sw/lib/python2.3/site-packages/trac/Module.py", line 44, in run
    self.render()
  File "/sw/lib/python2.3/site-packages/trac/Ticket.py", line 298, in render
    self.create_ticket()
  File "/sw/lib/python2.3/site-packages/trac/Ticket.py", line 290, in create_ticket
    tn.notify(ticket, newticket=1)
  File "/sw/lib/python2.3/site-packages/trac/Notify.py", line 189, in notify
    self.hdf.setValue('email.ticket_props', self.format_props())
  File "/sw/lib/python2.3/site-packages/trac/Notify.py", line 250, in format_props
    if len(tkt[f]) > width[idx+1]:
TypeError: len() of unsized object

but with this additional patch, it seems to work:

*** trac/Notify.py.orig Wed Nov 17 00:49:15 2004
--- trac/Notify.py      Wed Nov 17 00:49:45 2004
***************
*** 247,254 ****
              idx = 2*(i % 2)
              if len(fname) > width[idx]:
                  width[idx] = len(fname)
!             if len(tkt[f]) > width[idx+1]:
!                 width[idx+1] = len(tkt[f])
              i += 1
          format = (' %%%is:  %%-%is%s' % (width[0], width[1], CRLF),
                    '%%%is:  %%-%is  |  ' % (width[2], width[3]))
--- 247,254 ----
              idx = 2*(i % 2)
              if len(fname) > width[idx]:
                  width[idx] = len(fname)
!             if len(str(tkt[f])) > width[idx+1]:
!                 width[idx+1] = len(str(tkt[f]))
              i += 1
          format = (' %%%is:  %%-%is%s' % (width[0], width[1], CRLF),
                    '%%%is:  %%-%is  |  ' % (width[2], width[3]))

comment:7 by Jonas Borgström, 19 years ago

I can't reproduce this. What sqlite and pysqlite version are you using?

comment:8 by Christopher Lenz, 19 years ago

Component: generalticket system
Description: modified (diff)

comment:9 by daniel, 19 years ago

Resolution: fixed
Status: reopenedclosed

Let's see if [1084] does the trick.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain daniel.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from daniel to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.