ImportError: No module named trac

172 views
Skip to first unread message

Fernando N Filho

unread,
Jun 27, 2010, 4:01:01 PM6/27/10
to trac-...@googlegroups.com
Hello there,

I recently tried to upgrade my Trac Version from 0.11 to 0.12. But I now receive the following error on http://trac.potterish.com/:
Mod_python error: "PythonHandler trac.web.modpython_frontend"

Traceback (most recent call last):

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 287, in HandlerDispatch
    log=debug)

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 461, in import_module
    f, p, d = imp.find_module(parts[i], path)

ImportError: No module named trac
My .htaccess is configured the following way:

SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption PYTHON_EGG_CACHE /var/www/vhosts/potterish.com/subdomains/trac/httpdocs/editores/db
PythonOption TracEnvParentDir /var/www/vhosts/potterish.com/subdomains/trac/httpdocs
PythonOption TracUriRoot /

PythonDebug on

I looked on the Trac website and saw this had something to do with the Apache Path, but don't know how to fix it, does anybody have an idea of whats going on?

Thanks!

Noah Kantrowitz

unread,
Jun 28, 2010, 11:50:15 AM6/28/10
to trac-...@googlegroups.com
1) mod_python is a deprecated deployment option. The project has been
mothballed by its creators in favor of mod_wsgi. You should really
switch to a new deployment option (probably mod_wsgi).

2) You probably need a PythonPath in there which indicates where the
Trac code is installed.

PythonPath "['/path/to/site-packages'] + sys.path"

--Noah

> --
> You received this message because you are subscribed to the Google
> Groups "Trac Users" group.
> To post to this group, send email to trac-...@googlegroups.com.
> To unsubscribe from this group, send email to trac-users+...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
> .

Graham Dumpleton

unread,
Jun 28, 2010, 9:58:08 PM6/28/10
to Trac Users


On Jun 29, 1:50 am, Noah Kantrowitz <n...@coderanger.net> wrote:
> 1) mod_python is a deprecated deployment option. The project has been  
> mothballed by its creators in favor ofmod_wsgi. You should really  
> switch to a new deployment option (probablymod_wsgi).

It isn't really true to say that mod_python was mothballed in favour
of mod_wsgi. The mod_wsgi package is certainly an alternative, but
mod_python was mothballed because no one was interested in working on
mod_python. :-)

Graham

> 2) You probably need a PythonPath in there which indicates where the  
> Trac code is installed.
>
> PythonPath "['/path/to/site-packages'] + sys.path"
>
> --Noah
>
> On Jun 27, 2010, at 1:01 PM, Fernando N Filho wrote:
>
>
>
> > Hello there,
>
> > I recently tried to upgrade my Trac Version from 0.11 to 0.12. But I  
> > now receive the following error onhttp://trac.potterish.com/:

Noah Kantrowitz

unread,
Jun 28, 2010, 11:13:42 PM6/28/10
to trac-...@googlegroups.com

On Jun 28, 2010, at 6:58 PM, Graham Dumpleton wrote:

>
>
> On Jun 29, 1:50 am, Noah Kantrowitz <n...@coderanger.net> wrote:
>> 1) mod_python is a deprecated deployment option. The project has been
>> mothballed by its creators in favor ofmod_wsgi. You should really
>> switch to a new deployment option (probablymod_wsgi).
>
> It isn't really true to say that mod_python was mothballed in favour
> of mod_wsgi. The mod_wsgi package is certainly an alternative, but
> mod_python was mothballed because no one was interested in working on
> mod_python. :-)

I go with the simplified version so people don't ask the next question
of "What do I use instead?" ;-) Beats trying to explain the advantages
of mod_wsgi vs. FCGI in its various flavors.

--Noah

Fernando N Filho

unread,
Jun 29, 2010, 3:38:54 PM6/29/10
to trac-...@googlegroups.com
Thanks for the help!
Things are working correctly now!

Fernando Nery Filho

Vice President of Information Management in Uberlândia
Member of National Information Managers in Brazil 

Mobile: +55 (34) 9943-7325
 fern...@videozoom.com.br
Skype/ fnfilho
MSN/ fs....@hotmail.com
Facebook Twitter Orkut

Local Partners: FAGEN | Amcham | Ação Moradia | Cedro Finances | Sankhya | Algar

National Partners: Grupo Santander | Artemisia | Vale | Gerdau | Goodyear | Schlumberger | CIC – CNA | UniEthos | Symnetics | Instituto Holos | Talkstick | CIESP Oeste | FkPartners | Amcham |  Danone | LVBA Comunicação | Andrea Sebben | Módula | Vagas Tecnologia | Instituto Papel Solidário | Offline | Viva Talentos | EcoSocial


2010/6/29 Noah Kantrowitz <no...@coderanger.net>
Reply all
Reply to author
Forward
0 new messages