Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#1076 closed defect (fixed)

NameError on ics export Python 2.1

Reported by: yaver <clif@…> Owned by: Christopher Lenz
Priority: normal Milestone: 0.8.1
Component: roadmap Version: 0.8
Severity: normal Keywords: python21
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

If i request an ics export, i became a file with the follow errors:

*** Python traceback ***
Traceback (most recent call last):
  File "/usr/lib/python2.1/site-packages/trac/core.py", line 525, in cgi_start
    real_cgi_start()
  File "/usr/lib/python2.1/site-packages/trac/core.py", line 520, in
real_cgi_start
    dispatch_request(path_info, args, req, env)
  File "/usr/lib/python2.1/site-packages/trac/core.py", line 435, in
dispatch_request
    module.run()
  File "/usr/lib/python2.1/site-packages/trac/Module.py", line 46, in run
    disp()
  File "/usr/lib/python2.1/site-packages/trac/Roadmap.py", line 143, in
display_ics
    write_prop('BEGIN', 'VCALENDAR')
  File "/usr/lib/python2.1/site-packages/trac/Roadmap.py", line 130, in
write_prop
    self.req.write(text[:75] + CRLF)
NameError: global name 'self' is not defined

SW Specs: Trac 0.8 (deb http://ftp.edgewall.com/pub/debian sarge trac) Python 2.1 OS Debian/Linux (sarge)

Attachments (0)

Change History (3)

comment:1 by Otavio Salvador, 20 years ago

Looks like 2.1 doesn't support nested functions very well. A workaround is present and documented here: http://www.oreillynet.com/pub/wlg/6063

comment:2 by Christopher Lenz, 20 years ago

Keywords: python21 added
Status: newassigned

comment:3 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [1158], ported to stable in [1159].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.