On Mar 31, 10:44 pm, BA <[email protected]> wrote:
> Hello:
>
> I am receiving this error in the Apache log file when I try to 
> accesshttp://localhost/trac/
>
> mod_wsgi(pid=1212): Target WSGI script 'C:/projects/cbs/wsgi/
> cbs.wsgi' cannot be loaded as Python module.mod_wsgi(pid=1212): Exception 
> occurred processing WSGI script 'C:/
> projects/cbs/wsgi/cbs.wsgi'.
> Traceback (most recent call last):
>   File "C:/projects/cbs/wsgi/cbs.wsgi", line 6, in <module>
>     import trac.web.main
>   File "c:\\python\\python26\\lib\\site-packages\\Trac-0.11.3-py2.6.egg
> \\trac\\web\\__init__.py", line 12, in <module>
>     from trac.web.api import *
>   File "c:\\python\\python26\\lib\\site-packages\\Trac-0.11.3-py2.6.egg
> \\trac\\web\\api.py", line 17, in <module>
>     from BaseHTTPServer import BaseHTTPRequestHandler
>   File "C:\\python\\python26\\lib\\BaseHTTPServer.py", line 75, in
> <module>
>     import socket # For gethostbyaddr()
>   File "C:\\python\\python26\\lib\\socket.py", line 46, in <module>
>     import _socket
> ImportError: DLL load failed: The specified module could not be found.
>
> Trac works when I use the standalone server (tracd).
> I'm using:
> Python 2.6 (latest)
> PostgreSQL 8.3 (latest)
> psycopg2mod_wsgi(which seems to work when I use the example script, apache
> seems to be configured correctly)
> Apache 2.2 (latest)
>
> Can anybody give me a hand?

In your WSGI hello world example script add:

  import socket

Then you will find it probably fails.

Then replace that with:

  import sys
  print >> sys.stderr, sys.path

Look in the Apache error log for what sys.path is dumped out as.

Then search your system for file called '_socket.so'. Presuming that
is Python modules still have .so extension on Windows, can't remember.

If that directory isn't in sys.path, then likely that your Python
module search path is screwed, possibly because of broken Windows
registry entries.

Post results of what you get for sys.path and where the _socket
extension module is located.

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

Reply via email to