Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 18 years ago

#758 closed defect (worksforme)

reStructuredText does not work with mod_python

Reported by: anonymous Owned by: Christopher Lenz
Priority: normal Milestone:
Component: web frontend/mod_python Version: devel
Severity: critical Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When I have an RST block in a wiki and trac runs with mod_python I get the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.2/site-packages/trac/ModPythonHandler.py", line 191, in handler
    core.dispatch_request(mpr.path_info, args, mpr, env)
  File "/usr/lib/python2.2/site-packages/trac/core.py", line 433, in dispatch_request
    module.run()
  File "/usr/lib/python2.2/site-packages/trac/Module.py", line 45, in run
    self.render()
  File "/usr/lib/python2.2/site-packages/trac/Wiki.py", line 322, in render
    Formatter(self.req.hdf, self.env,self.db).format(self.page.text, out)
  File "/usr/lib/python2.2/site-packages/trac/WikiFormatter.py", line 517, in format
    self.handle_code_block(line)
  File "/usr/lib/python2.2/site-packages/trac/WikiFormatter.py", line 478, in handle_code_block
    self.out.write(self.code_processor(self.hdf, self.code_text, self.env))
  File "/usr/lib/python2.2/site-packages/trac/wikimacros/rst.py", line 209, in execute
    settings_overrides = {'halt_level':6})
  File "/usr/lib/python2.2/site-packages/docutils/core.py", line 371, in publish_string
    enable_exit_status=enable_exit_status)
  File "/usr/lib/python2.2/site-packages/docutils/core.py", line 513, in publish_programmatically
    output = pub.publish(enable_exit_status=enable_exit_status)
  File "/usr/lib/python2.2/site-packages/docutils/core.py", line 196, in publish
    output = self.writer.write(document, self.destination)
  File "/usr/lib/python2.2/site-packages/docutils/writers/__init__.py", line 73, in write
    output = self.destination.write(self.output)
  File "/usr/lib/python2.2/site-packages/docutils/io.py", line 293, in write
    self.destination = self.encode(data)
  File "/usr/lib/python2.2/site-packages/docutils/io.py", line 132, in encode
    return data.encode(self.encoding, self.error_handler)
  File "/usr/lib/python2.2/encodings/__init__.py", line 51, in search_function
    mod = __import__(modname,globals(),locals(),'*')
RuntimeError: cannot unmarshal code objects in restricted execution mode

Attachments (0)

Change History (3)

comment:1 by Jonas Borgström, 20 years ago

Does this work when you're using trac.cgi?

comment:2 by anonymous, 20 years ago

Yes it does.

comment:3 by Christopher Lenz, 20 years ago

Resolution: worksforme
Status: newclosed

See for example http://aspn.activestate.com/ASPN/Mail/Message/xml-sig/1690577.

All the references to this error I could find say this is a bug in some version of Python 2.2 and there isn't much we can do about it. Try upgrading your Python install, or if that is an option. Otherwise we might be able to hack the source in some way as briefly explained in the thread I linked to above.

Anyway, this doesn't seem to be a Trac issue, and unless you or someone else who can reproduce the problem provides a simple patch, we won't be doing anything about this.

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.