1

This problem already has been described mutliple times in different mailing lists, but no solution has yet been published.

My original setup is as follows (but in the mean time i have a simpler one on Windows 7):

  • Ubuntu server with apache 2.2 and python 2.7
  • virutal python environment created with virtualenv
  • installed babel, genshi and trac in this order using pip in the virtual environment

Trac seems to run fine with tracd, but when visiting it through apache, i get the following error in an official trac error page:

AttributeError: Cannot find an implementation of the "IRequestHandler" interface named "WikiModule"

The stacktrace looks like this:

Traceback (most recent call last):
 File "/srv/trac/python-environment/lib/python2.5/site-packages/Trac-0.13dev_r10668-py2.5.egg/trac/web/main.py",line 473, in _dispatch_request
   dispatcher.dispatch(req)
 File "/srv/trac/python-environment/lib/python2.5/site-packages/Trac-0.13dev_r10668-py2.5.egg/trac/web/main.py", line 154, in dispatch
   chosen_handler = self.default_handler
 File "/srv/trac/python-environment/lib/python2.5/site-packages/Trac-0.13dev_r10668-py2.5.egg/trac/config.py", line 691, in __get__
   self.section, self.name))
AttributeError: Cannot find an implementation of the "IRequestHandler" interface named "WikiModule".  Please update the option trac.default_handler in trac.ini.

I already tried a lot to get down to the root of the problem, for me it looks as if all nativ trac components refuse to load. When one explicitely imports these components in the wsgi handler, some of them start to work somehow.

Since i suspected the virtual environment, i dropped it, and manually copied all dependencies (babel, genshi, trac, ..) to one directory, and added this directory to system.path in the wsgi handler. I get exactly the same error. Since this setup is now independend from the environment, one can easily try it out on any other machine (windows or linux) running apache 2 and python 2.7. On my Windwos 7 machine, i got exactly the same problem.

I zipped together the whole bundle, one can download it from http://www.xterity.de/tmp/trac-installation.zip .

In the apache configuration (Windows 7 machine) i use the following settings:

Alias /trac/chrome/common "D:/workspace/trac-installation/trac-resources/common"
Alias /trac/chrome/site "D:/workspace/trac-installation/trac-resources/site"

WSGIScriptAlias /trac "D:/workspace/trac-installation/apache/handler.wsgi"

<Directory "D:/workspace/trac-installation/trac-resources">
     Order allow,deny
     Allow from all
</Directory>

<Directory "D:/workspace/trac-installation">
     Order allow,deny
     Allow from all
</Directory>

<Location "/trac">
 Order allow,deny
 Allow from all
</Location>

And my handler.wsgi looks like this:

import os
import sys

sys.path.append('D:/workspace/trac-installation/dependencies/')

os.environ['TRAC_ENV'] = 'D:/workspace/trac-installation/trac-environments/Esp004'
os.environ['PYTHON_EGG_CACHE'] = 'D:/workspace/trac-installation/eggs'

import trac.web.main
application = trac.web.main.dispatch_request

Has anybody got an idea what could be the problem, or how to find out where it comes from?

1 Answer 1

0

First thing I would try, is to run Trac by it's own stand-alone web server module tracd. So you narrow it down to the web server configuration. But you did this already - it'S the server configuration.

So - probably unrelated - second, is there a special reason, why you chose a development version for your application? I'd start with a stable release, 0.12.3 at the time of this writing.

Further on, try to follow available instructions on the wiki docs at trac.edgewall.org . It looks like you can modify and possibly improve things using example code from there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .