Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 6 years ago

#7446 closed defect (invalid)

Python handler error returning "500 internal server error" in browser

Reported by: jdc@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

Hi,

I was installing Trac and got this error returned:

[Fri Jul 18 11:39:14 2008] [error] [client 192.168.2.3] PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):
[Fri Jul 18 11:39:14 2008] [error] [client 192.168.2.3] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
[Fri Jul 18 11:39:14 2008] [error] [client 192.168.2.3] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/modpython_frontend.py", line 127, in handler\n    from trac.web.main import dispatch_request
[Fri Jul 18 11:39:14 2008] [error] [client 192.168.2.3] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/main.py", line 47, in ?\n    from trac.web.chrome import Chrome
[Fri Jul 18 11:39:14 2008] [error] [client 192.168.2.3] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/chrome.py", line 40, in ?\n    from trac.util import compat, get_reporter_id, presentation, get_pkginfo, \\
[Fri Jul 18 11:39:14 2008] [error] [client 192.168.2.3] PythonHandler trac.web.modpython_frontend: ImportError: cannot import name compat

This is my code in trac.conf

<Location /trac/testproject>
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnv /tcs/trac/testproject
        PythonOption TracUriRoot /trac/testproject
</Location>

<Location "/trac/testproject/login">
        AuthType Basic
        AuthName "trac"
        AuthUserFile /tcs/trac/testproject.htpasswd
        Require valid-user
</Location>

Is there any more information required to solve this problem?

Attachments (0)

Change History (7)

comment:1 by Christian Boos, 16 years ago

Description: modified (diff)
Milestone: 2.0

Well, you never know if that pastebin link will last for the few years to come… better include the actual error inline.

Chances are that your mod_python is still seeing some parts of an older (0.9 or 0.10) Trac installation.

Check your PYTHONPATH and check the following locations:

  • /usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/util/compat.py (should be there)
  • /usr/lib/python2.4/site-packages/trac (should not be there)

in reply to:  1 comment:2 by anonymous, 16 years ago

Replying to cboos:

Well, you never know if that pastebin link will last for the few years to come… better include the actual error inline.

Chances are that your mod_python is still seeing some parts of an older (0.9 or 0.10) Trac installation.

Check your PYTHONPATH and check the following locations:

  • /usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/util/compat.py (should be there)
  • /usr/lib/python2.4/site-packages/trac (should not be there)

Hi, thanks for the fast response and integrating the error inline.

The install on this box is fresh so it's impossible mod_python is still seeing parts of an older installation. I have also checked PYTHONPATH and it looks okay. I checked the directories as you suggested and everything looks like it should be.

Do you know any other things that could cause this error?

Thanks, Jasper

comment:3 by Christian Boos, 16 years ago

Resolution: invalid
Status: newclosed

Do you know any other things that could cause this error?

No, sorry. You should better ask on the mailing list then (as for installation issues in general - hence closing the ticket).

comment:4 by anonymous, 16 years ago

Looks like the problem solved itself… I don't receive the errors anymore and everything seems to work just fine!

comment:5 by Christian Boos, 16 years ago

Just noticed that related thread on Trac-users today: googlegroups:trac-users:f0a0ba4fc955a0a4

Not sure what the exact problem is, but seems to be related to the presence of another compat.py file (source:trunk/trac/tests/functional/compat.py).

comment:7 by brajesh@…, 6 years ago

hello,

I want to add plugin on trac after installation trac show error "Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at you@… to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log."

please help.

in reply to:  7 comment:8 by Ryan J Ollos, 6 years ago

Replying to brajesh@…:

I want to add plugin on trac after installation trac show error "Internal Server Error

Please ask on the MailingList.

Modify Ticket

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