Thank you On Aug 12, 10:22 pm, Graham Dumpleton <[email protected]> wrote: > For whatever reason, Paste deploy isn't dealing with your zipped egg > file. Suggest you install it as an expanded egg based package instead. > > Alternatively, you will need to go ask TG people whether one can have > a site as zipped egg file and how to get it to work as I can't think > of anything else to suggest. > > Graham > > On 13 August 2010 07:15, James Durham <[email protected]> wrote: > > > 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# > > ... > > 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.
