Try adding the .egg to sys.path explicitly, i.e.

sys.path.insert(0, "/home/redmulec/python/flup-1.0-py2.4.egg")


On Jan 8, 6:51 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
> Graham Dumpleton wrote:
> > On Jan 8, 2:29 pm, Michael Hipp <[EMAIL PROTECTED]> wrote:
> >> Does any of that offer any clues?
>
> > Not really. You really need to do what Milan said back at the
> > beginning. See if you can get the actual error messages logged in the
> > Apache error log files for the request, plus post your .fcgi file.
>
> Well, I'm making progress. It's now giving me some error messages:
>
> ----------------------
> ERROR: No module named flup Unable to load the flup package. In order to
> run django as a FastCGI application, you will need to get flup 
> fromhttp://www.saddi.com/software/flup/If you've already installed flup,
> then make sure you have it in your PYTHONPATH.
> ----------------------
>
> So I added some print statements
> ----------------------
> ['/home/redmulec/djcode', '/home/redmulec/djtrunk',
> '/home/redmulec/python', '/home/redmulec/public_html',
> '/usr/lib64/python23.zip', '/usr/lib64/python2.3',
> '/usr/lib64/python2.3/plat-linux2', '/usr/lib64/python2.3/lib-tk',
> '/usr/lib64/python2.3/lib-dynload',
> '/usr/lib64/python2.3/site-packages',
> '/usr/lib64/python2.3/site-packages/gtk-2.0',
> '/usr/lib/python2.3/site-packages'] Traceback (most recent call last):
> File "redmule.fcgi", line 10, in ? import flup ImportError: No module
> named flup [Mon Jan 07 22:47:07 2008] [warn] (104)Connection reset by
> peer: mod_fcgid: read data from fastcgi server error. [Mon Jan 07
> 22:47:07 2008] [error] [client 75.116.4.1] Premature end of script
> headers: redmule.fcgi [Mon Jan 07 22:47:07 2008] [error] [client
> 75.116.4.1] suexec failure: could not open log file [Mon Jan 07 22:47:07
> 2008] [error] [client 75.116.4.1] fopen: Permission denied [Mon Jan 07
> 22:47:07 2008] [error] [client 75.116.4.1] Premature end of script
> headers: 500.php [Mon Jan 07 22:47:10 2008] [notice] mod_fcgid: process
> /home/redmulec/public_html/redmule.fcgi(16629) exit(communication
> error), terminated by calling exit(), return code: 1
> ----------------------
>
> So it's obvious something is fubar with flup. But from the command line
> it runs fine:
>
> $ python
> Python 2.4.3 (#1, Nov 15 2007, 14:40:32)
> [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import flup
>  >>>
>
> Probably a PYTHONPATH problem. But it looks below as if my PYTHONPATH
> should be fine. I've installed flup in ~/python.
>
> $ ls -lh ~/python
> total 884K
> -rwxr-xr-x  1 redmulec redmulec  286 Jan  7 22:15 easy_install
> -rwxr-xr-x  1 redmulec redmulec  294 Jan  7 22:15 easy_install-2.4
> -rw-rw-r--  1 redmulec redmulec  235 Jan  7 22:19 easy-install.pth
> drwxrwxr-x  2 redmulec redmulec 4.0K Jan  6 09:56 eunuchs
> -rw-rw-r--  1 redmulec redmulec 8.8K Sep  4 10:48 ez_setup.py
> -rwxrwxr-x  1 redmulec redmulec 371K Jan  6 09:54 flup-1.0-py2.3.egg
> -rw-rw-r--  1 redmulec redmulec 133K Jan  7 22:19 flup-1.0-py2.4.egg
> drwxrwxr-x  4 redmulec redmulec 4.0K Jan  7 22:13 setuptools-0.6c6-py2.3.egg
> -rw-rw-r--  1 redmulec redmulec 320K Jan  7 22:13 setuptools-0.6c7-py2.4.egg
> -rw-rw-r--  1 redmulec redmulec   29 Jan  7 22:15 setuptools.pth
> -rw-rw-r--  1 redmulec redmulec 2.4K Jan  6 09:48 site.py
> -rw-rw-r--  1 redmulec redmulec 1.8K Jan  7 21:36 site.pyc
>
> My .fcgi file:
> ----------------------
> #!/usr/bin/python
> import sys, os
>
> # Add a custom Python path.
> sys.path.insert(0, "/home/redmulec/python")
> sys.path.insert(0, "/home/redmulec/djtrunk")
> sys.path.insert(0, "/home/redmulec/djcode")
>
> print sys.path
> import flup
>
> # Switch to the directory of your project. (Optional.)
> os.chdir("/home/redmulec/djcode")
>
> # Set the DJANGO_SETTINGS_MODULE environment variable.
> os.environ['DJANGO_SETTINGS_MODULE'] = "redmule.settings"
>
> from django.core.servers.fastcgi import runfastcgi
> runfastcgi(method="threaded", daemonize="false")
> ----------------------
>
> How can I convince this thing that flup is indeed installed?
>
> Is it because it's installed as an egg?
>
> Thanks,
> Michael
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to