Hi,

you need to know what sys.path looks like. This is a list of
searched directories.

try:
    import .... # Import lines that failes
except ImportError, exc:
    import sys
    raise ImportError('%s %s' % (exc, sys.path))

Then check if the stuff you want to import is on sys.path.

Simon Lee schrieb:
> I am trying to set up a simple test website in the Apache Server that
> comes with OSX 10.5.8 and continuously ran into errors that
> complainted about not able to import something in pscycopg2. The site
> works if I ran with the django development server. When I port to
> Apache, it did not work. Can someone tell me what I am missing?
> ...
...
> The following error was logged in my error log file:
> 
> [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1] mod_wsgi
> (pid=120): Exception occurred processing WSGI script '/Users/myname/
> mysite3/apache/myapp.wsgi'.
> [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1] Traceback (most
> recent call last):
> [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1]   File "/Users/
> myname/mysite3/django/core/handlers/wsgi.py", line 239, in __call__
> [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1]   File "/Users/
> myname/mysite3/django/core/handlers/base.py", line 67, in get_response
> [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1]   File "/Users/
> myname/mysite3/django/contrib/sessions/middleware.py", line 9, in
> process_request
> [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1] ImportError: No
> module named db

Here you will find your ImportError and sys.path.


-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

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

Reply via email to