All of the cutting and pasting added a lot of white space that I
didn't catch.
By the way, I am using the templates from modwsgideploy as a
reference.
I should have paid closer attention to the wsgi script.

I am back to non existent directories now.
Here's the start of the error log.
Debian5:/home/james# tail -f /var/log/apache2/error.log
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4227): Starting thread 7 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4225): Starting thread 8 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4226): Starting thread 8 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4227): Starting thread 8 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4225): Starting thread 9 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4226): Starting thread 9 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4227): Starting thread 9 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4225): Starting thread 10 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4226): Starting thread 10 in daemon process 'myapp'.
[Thu Aug 12 15:47:44 2010] [debug] mod_wsgi.c(8673): mod_wsgi
(pid=4227): Starting thread 10 in daemon process 'myapp'.
[Thu Aug 12 15:48:03 2010] [info] mod_wsgi (pid=4225): Create
interpreter '192.168.149.128|/myapp'.
[Thu Aug 12 15:48:03 2010] [info] mod_wsgi (pid=4225): Adding '/usr/
local/turbogears/BASELINE/lib/python2.5/site-packages' to path.
[Thu Aug 12 15:48:03 2010] [info] [client 127.0.0.1] mod_wsgi
(pid=4225, process='myapp', application='192.168.149.128|/myapp'):
Loading WSGI script '/usr/local/turbogears/myapp/apache/myapp.wsgi'.
[Thu Aug 12 15:48:03 2010] [info] mod_wsgi (pid=4286): Attach
interpreter ''.
[Thu Aug 12 15:48:17 2010] [debug] mod_deflate.c(615): [client
127.0.0.1] Zlib: Compressed 430 to 223 : URL /myapp
[Thu Aug 12 15:48:17 2010] [info] mod_wsgi (pid=4227): Create
interpreter '192.168.149.128|/myapp'.
[Thu Aug 12 15:48:17 2010] [info] mod_wsgi (pid=4227): Adding '/usr/
local/turbogears/BASELINE/lib/python2.5/site-packages' to path.
[Thu Aug 12 15:48:17 2010] [info] [client 127.0.0.1] mod_wsgi
(pid=4227, process='myapp', application='192.168.149.128|/myapp'):
Loading WSGI script '/usr/local/turbogears/myapp/apache/myapp.wsgi'.
[Thu Aug 12 15:48:20 2010] [error] [client 127.0.0.1] Error - <type
'exceptions.OSError'>: [Errno 20] Not a directory: '/usr/local/
turbogears/BASELINE/lib/python2.5/site-packages/myapp-0.1dev-py2.5.egg/
myapp/controllers'
.....
the remaining theme is not a directory thing.

I'm now thinking this is an install issue with turbogears.  However I
don't
know the python egg stuff enough to solve this.
TurboGears app's that are developed look like that they distributed
using this format.
I think I am installing the app in the virtual environment, but all
I'm seeing is
an egg file in BASELINE/lib/python2.5/site-packages.

I apologize if I am wasting your time, but there is something here.  I
am using
the documentation from pylons, turbogears, and of course your's.

Here is the current conf files.
--------------------------------------------
# Begin Apache 2 conf, filename "myapp", path "/etc/apache2/sites-
available"
Alias /myapp/images /usr/local/turbogears/myapp/myapp/public/images
Alias /myapp/css /usr/local/turbogears/myapp/myapp/public/css
Alias /myapp/javascript /usr/local/turbogears/myapp/myapp/public/
javascript

# my BASELINE is probably wrong(i.e. it may not be a BASELINE)
#WSGIPythonHome /usr/local/turbogears/BASELINE/
# removing WSGIPythonHome

WSGIDaemonProcess myapp threads=10 processes=3 python-path=/usr/local/
turbogears/BASELINE/lib/python2.5/site-packages
WSGIProcessGroup myapp
WSGIScriptAlias /myapp /usr/local/turbogears/myapp/apache/myapp.wsgi

<Directory /usr/local/turbogears/myapp/apache>
Order deny,allow
Allow from all
</Directory>
# End Apache 2 conf
---------------------------------------------
# Begin myapp.wsgi, path "/usr/local/turbogears/myapp/apache"

import os, sys
sys.path.append('/usr/local/turbogears/myapp')

os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myapp/python-
eggs'

prev_sys_path = list(sys.path)

#import site
#site.addsitedir('/usr/local/pythonenv/BASELINE/lib/python2.5/site-
packages')

new_sys_path = []
for item in list(sys.path):
    if item not in prev_sys_path:
       new_sys_path.append(item)
       sys.path.remove(item)
       sys.path[:0] = new_sys_path

#from paste.script.util.logging_config import fileConfig
#fileConfig('/usr/local/turbogears/myapp/production.ini')

from paste.deploy import loadapp
application = loadapp('config:/usr/local/turbogears/myapp/
production.ini')
# End myapp.wsgi


On Aug 11, 8:41 pm, Graham Dumpleton <[email protected]>
wrote:
> I don't have time right now to go through this properly. A quick few
> things to try though.
>
> Move:
>
>   os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myapp/python-eggs'
>
> to global scope in WSGI script file, not nested. Ie., put it right
> near start after importing 'os'.
>
> Comment out the line:
>
>   site.addsitedir('/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages')
>
> Then modify Apache configuration to use:
>
>   WSGIDaemonProcess myapp threads=10 processes=3
> python-path=/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages
>
> Using python-path causes some sys.path reordering to occur.
>
> It may be that you have partial Paste installation in system wide
> site-packages and deploy is missing from it.
>
> The python-path option ensures that local virtual environment takes 
> precedence.
>
> See:
>
>  http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
>
> for a bit of an explanation.
>
> Graham
>
> On 12 August 2010 11:29, James Durham <[email protected]> wrote:
>
> > I rebuilt the myapp exercise of a quickstarted tg2 distribution.
> > The reason why there was a discrepancy between the conf files and
> > the error log is that the conf files that I e-mailed had the paths
> > slightly
> > different from an earlier trial.  I have the current versions of
> > everything in
> > this e-mail.
>
> > I have set all of the files ownerships to the apache user, under /usr/
> > local/turbogears.
> > I also turned off the WSGIPythonHome directive
>
> > Here is the current error statement:
> > Debian5:/usr/local/turbogears/BASELINE/bin# tail -f /var/log/apache2/
> > error.log
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5110): Starting thread 8 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5112): Starting thread 8 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5116): Starting thread 7 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5110): Starting thread 9 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5112): Starting thread 9 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5116): Starting thread 8 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5110): Starting thread 10 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5112): Starting thread 10 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5116): Starting thread 9 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:18 2010] [debug] mod_wsgi.c(8673): mod_wsgi
> > (pid=5116): Starting thread 10 in daemon process 'myapp'.
> > [Wed Aug 11 19:58:33 2010] [info] mod_wsgi (pid=5110): Create
> > interpreter '192.168.149.128|/myapp'.
> > [Wed Aug 11 19:58:33 2010] [info] [client 127.0.0.1] mod_wsgi
> > (pid=5110, process='myapp', application='192.168.149.128|/myapp'):
> > Loading WSGI script '/usr/local/turbogears/myapp/apache/myapp.wsgi'.
> > [Wed Aug 11 19:58:33 2010] [error] [client 127.0.0.1] mod_wsgi
> > (pid=5110): Target WSGI script '/usr/local/turbogears/myapp/apache/
> > myapp.wsgi' cannot be loaded as Python module.
> > [Wed Aug 11 19:58:33 2010] [error] [client 127.0.0.1] mod_wsgi
> > (pid=5110): Exception occurred processing WSGI script '/usr/local/
> > turbogears/myapp/apache/myapp.wsgi'.
> > [Wed Aug 11 19:58:33 2010] [error] [client 127.0.0.1] Traceback (most
> > recent call last):
> > [Wed Aug 11 19:58:33 2010] [error] [client 127.0.0.1]   File "/usr/
> > local/turbogears/myapp/apache/myapp.wsgi", line 25, in <module>
> > [Wed Aug 11 19:58:33 2010] [error] [client 127.0.0.1]     from
> > paste.deploy import loadapp
> > [Wed Aug 11 19:58:33 2010] [error] [client 127.0.0.1] ImportError: No
> > module named paste.deploy
> > [Wed Aug 11 19:58:33 2010] [debug] mod_deflate.c(615): [client
> > 127.0.0.1] Zlib: Compressed 734 to 452 : URL /myapp
> > ^C
> > Debian5:/usr/local/turbogears/BASELINE/bin#
> > -------------
> > End Statement
> > -------------
>
> > Here is the: ls -las /usr/local/turbogears/BASELINE
> > total 0
> > 0 drwxr-sr-x 5 www-data www-data 120 2010-08-11 18:00 .
> > 0 drwxr-sr-x 4 www-data www-data  96 2010-08-11 18:21 ..
> > 0 drwxr-sr-x 2 www-data www-data 368 2010-08-11 18:41 bin
> > 0 drwxr-sr-x 2 www-data www-data  80 2010-08-11 18:00 include
> > 0 drwxr-sr-x 3 www-data www-data  80 2010-08-11 18:00 lib
>
> > -------------
> > End Statement
> > -------------
>
> > Here is the: ls -las /usr/local/turbogears/BASELINE/lib/python2.5/site-
> > packages
> > total 1552
> >  3 drwxr-sr-x 39 www-data www-data   2736 2010-08-11 19:00 .
> >  1 drwxr-sr-x  4 www-data www-data   1224 2010-08-11 18:00 ..
> >  20 -rw-r--r--  1 www-data root      18945 2010-08-11 18:19 AddOns-0.6-
> > py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:41
> > Babel-0.9.5-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:18 Beaker-1.3-
> > py2.5.egg
> >  36 -rw-r--r--  1 www-data root      35513 2010-08-11 18:19
> > BytecodeAssembler-0.3-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:41
> > Catwalk-2.0.2-py2.5.egg
> >  0 drwxr-sr-x  3 www-data www-data    136 2010-08-11 18:16
> > decorator-3.0.0-py2.5.egg
> >  28 -rw-r--r--  1 www-data root      28062 2010-08-11 18:19
> > DecoratorTools-1.7-py2.5.egg
> >  4 -rw-r--r--  1 www-data www-data   1763 2010-08-11 19:00 easy-
> > install.pth
> >  8 -rw-r--r--  1 www-data root       5935 2010-08-11 18:19
> > Extremes-1.1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data    104 2010-08-11 18:18
> > FormEncode-1.2.1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data    104 2010-08-11 18:41
> > FormEncode-1.2.2-py2.5.egg
> > 224 -rw-r--r--  1 www-data root     227881 2010-08-11 18:15
> > Genshi-0.5.1-py2.5-linux-i686.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:17 Mako-0.2.4-
> > py2.5.egg
> > 128 -rw-r--r--  1 www-data www-data 128709 2010-08-11 19:00
> > myapp-0.1dev-py2.5.egg
> >  4 -rw-r--r--  1 www-data www-data     29 2010-08-11 18:53 myapp.egg-
> > link
> >  0 drwxr-sr-x  5 www-data www-data    120 2010-08-11 18:17
> > nose-0.10.4-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:14
> > Paste-1.7.2-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:18
> > PasteDeploy-1.3.3-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:18
> > PasteScript-1.7.3-py2.5.egg
> >  80 -rw-r--r--  1 www-data root      79995 2010-08-11 18:16
> > PEAK_Rules-0.5a1.dev_r2582-py2.5.egg
> >  12 -rw-r--r--  1 www-data root       9801 2010-08-11 18:16
> > prioritized_methods-0.2.1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:17
> > Pygments-1.0-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:16
> > Pylons-0.9.7-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:15
> > repoze.tm2-1.0a4-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:14
> > repoze.what-1.0.8-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:14
> > repoze.what.plugins.sql-1.0rc1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:15
> > repoze.what_pylons-1.0rc3-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:12
> > repoze.what_quickstart-1.0-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:12
> > repoze.who-1.0.15-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:14
> > repoze.who_friendlyform-1.0b3-py2.5.egg
> >  0 drwxr-sr-x  5 www-data www-data    120 2010-08-11 18:14
> > repoze.who.plugins.sa-1.0rc1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:16
> > repoze.who_testutil-1.0rc1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:19
> > Routes-1.10.3-py2.5.egg
> > 328 -rw-r--r--  1 www-data www-data 333390 2010-08-11 18:10
> > setuptools-0.6c11-py2.5.egg
> > 320 -rw-r--r--  1 www-data www-data 324858 2008-05-20 16:20
> > setuptools-0.6c8-py2.5.egg
> >  4 -rw-r--r--  1 www-data www-data     30 2010-08-11 19:00
> > setuptools.pth
> >  92 -rw-r--r--  1 www-data root      90415 2010-08-11 18:16
> > simplejson-2.0.8-py2.5-linux-i686.egg
> >  0 drwxr-sr-x  5 www-data www-data    120 2010-08-11 18:41
> > sprox-0.6.10-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data    104 2010-08-11 18:13
> > SQLAlchemy-0.5.1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:13
> > sqlalchemy_migrate-0.5.2-py2.5.egg
> >  8 -rw-r--r--  1 www-data root       4217 2010-08-11 18:19
> > SymbolType-1.0-py2.5.egg
> >  24 -rw-r--r--  1 www-data root      21532 2010-08-11 18:17
> > Tempita-0.2-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:01
> > tg.devtools-2.0.2-py2.5.egg
> >  36 -rw-r--r--  1 www-data root      35161 2010-08-11 18:41
> > tgext.admin-0.3.10-py2.5.egg
> >  20 -rw-r--r--  1 www-data root      18082 2010-08-11 18:41
> > tgext.crud-0.3.8-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:41
> > ToscaWidgets-0.9.10-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:15
> > ToscaWidgets-0.9.4-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data    104 2010-08-11 18:16
> > transaction-1.0a1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:13
> > TurboGears2-2.0.3-py2.5.egg
> >  16 -rw-r--r--  1 www-data root      15121 2010-08-11 18:14
> > TurboJson-1.2.1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:41
> > tw.forms-0.9.9-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:15
> > WebError-0.10.1-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data     96 2010-08-11 18:15
> > WebFlash-0.1a9-py2.5.egg
> >  0 drwxr-sr-x  4 www-data www-data    104 2010-08-11 18:19
> > WebHelpers-0.6.4-py2.5.egg
> > 112 -rw-r--r--  1 www-data root     112707 2010-08-11 18:17
> > WebOb-0.9.6.1-py2.5.egg
> >  44 -rw-r--r--  1 www-data root
>
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to