Hi Graham,
I modified the pyramid.wsgi script, and added the path to the
application manually to the sys.path and added the application folder to
the sys.path....

the egg cache is apache group and user owned, so that it is fully
writable, and I don't have multiple python version installed, only
python 2.7.3


pyramid.wsgi:

import os,sys
os.environ['PYTHON_EGG_CACHE'] = '/tmp/.eggs'

sys.path.append('/storage/PyProjects/UKDMindMapperApp')
print sys.path
print >>
sys.stderr,os.listdir('/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages')

from pyramid.paster import get_app
application =
get_app('/storage/PyProjects/UKDMindMapperApp/development.ini','main')


and the output is here, with the application folder added, and the same
error as before...


I have downloaded the latest trunc of mod_wsgi, compiled and use it in
apache. here is the result...


any further ideas?!

apache error_log:

tamer@office / $ sudo tail -n 40 /var/log/apache2/error_log
[Tue May 22 03:55:10 2012] [error] [client 127.0.0.1]     raise
DistributionNotFound(req)
[Tue May 22 03:55:10 2012] [error] [client 127.0.0.1]
DistributionNotFound: UKDMindMapperApp
[Tue May 22 03:58:55 2012] [notice] caught SIGTERM, shutting down
[Tue May 22 03:58:58 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22
OpenSSL/1.0.0j mod_wsgi/4.0-TRUNK Python/2.7.3 configured -- resuming
normal operations
[Tue May 22 03:59:00 2012] [error]
['/usr/lib/python2.7/site-packages/ZODB3-3.10.3-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/zdaemon-2.0.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/ZConfig-2.9.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/zc.lockfile-1.0.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/transaction-1.1.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/Mako-0.4.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/Chameleon-2.4.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg',
'/usr/lib/python2.7/site-packages/docutils-0.8-py2.7.egg',
'/usr/lib/python2.7/site-packages/Pygments-1.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/SOAPpy-0.12.5-py2.7.egg',
'/usr/lib/python2.7/site-packages/wstools-0.3-py2.7.egg',
'/usr/lib/python2.7/site-packages/netifaces-0.5-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/distribute-0.6.21-py2.7.egg',
'/usr/lib/python2.7/site-packages/zc.catalog-1.5-py2.7.egg',
'/usr/lib/python2.7/site-packages/z3c.autoinclude-0.3.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/simplejson-2.2.1-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/pytz-2011j-py2.7.egg',
'/usr/lib/python2.7/site-packages/martian-0.14-py2.7.egg',
'/usr/lib/python2.7/site-packages/WebTest-1.3.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/zc.buildout-1.5.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/z3c.flashmessage-1.3-py2.7.egg',
'/usr/lib/python2.7/site-packages/z3c.pt-2.1.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/RestrictedPython-3.6.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/mechanize-0.2.5-py2.7.egg',
'/usr/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/translationstring-0.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/repoze.lru-0.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/WebOb-1.2b2-py2.7.egg',
'/usr/lib/python2.7/site-packages/megrok.jinja-0.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/PyYAML-3.10-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg',
'/usr/lib/python2.7/site-packages/virtualenv-1.7-py2.7.egg',
'/usr/lib/python2.7/site-packages/pyodbc-3.0.3-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/pycups-1.9.60-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/venusian-1.0a3-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pyramid-1.3.2-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/zope.deprecation-4.0.0-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/zope.interface-4.0.0-py2.7-linux-x86_64.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pymongo-2.2-py2.7-linux-x86_64.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pyramid_jinja2-1.3-py2.7.egg',
'/usr/lib/python2.7/site-packages', '/usr/src/fs',
'/usr/lib/python2.7/site-packages/PIL',
'/usr/lib/python2.7/site-packages/gst-0.10',
'/usr/lib/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode',
'/storage/PyENV/lin/UKDMindMapper/lib64/python27.zip',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/plat-linux2',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/lib-tk',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/lib-old',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/lib-dynload',
'/usr/lib/python2.7', '/usr/lib64/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages',
'/storage/PyProjects/UKDMindMapperApp']
[Tue May 22 03:59:00 2012] [error] ['pyramid_jinja2-1.3-py2.7.egg',
'pip-1.0.2-py2.7.egg', 'easy-install.pth',
'zope.interface-4.0.0-py2.7-linux-x86_64.egg',
'pymongo-2.2-py2.7-linux-x86_64.egg', 'setuptools-0.6c11-py2.7.egg',
'pyramid-1.3.2-py2.7.egg', 'zope.deprecation-4.0.0-py2.7.egg']
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1] mod_wsgi
(pid=22115): Target WSGI script
'/storage/PyENV/lin/UKDMindMapper/pyramid.wsgi' cannot be loaded as
Python module.
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1] mod_wsgi
(pid=22115): Exception occurred processing WSGI script
'/storage/PyENV/lin/UKDMindMapper/pyramid.wsgi'.
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/storage/PyENV/lin/UKDMindMapper/pyramid.wsgi", line 8, in <module>
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     application =
get_app('/storage/PyProjects/UKDMindMapperApp/development.ini','main')
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pyramid-1.3.2-py2.7.egg/pyramid/paster.py",
line 32, in get_app
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     app =
loadapp(config_name, name=section, relative_to=here_dir)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 247, in loadapp
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     return
loadobj(APP, uri, name=name, **kw)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 271, in loadobj
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]
global_conf=global_conf)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 296, in loadcontext
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]
global_conf=global_conf)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 320, in _loadconfig
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     return
loader.get_context(object_type, name, global_conf)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 454, in get_context
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     section)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 476, in _context_from_use
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     object_type,
name=use, global_conf=global_conf)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 406, in get_context
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]
global_conf=global_conf)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 296, in loadcontext
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]
global_conf=global_conf)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 328, in _loadegg
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     return
loader.get_context(object_type, name, global_conf)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 620, in get_context
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     object_type,
name=name)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py",
line 640, in find_egg_entry_point
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]
pkg_resources.require(self.spec)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/distribute-0.6.21-py2.7.egg/pkg_resources.py",
line 686, in require
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     needed =
self.resolve(parse_requirements(requirements))
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/site-packages/distribute-0.6.21-py2.7.egg/pkg_resources.py",
line 584, in resolve
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]     raise
DistributionNotFound(req)
[Tue May 22 03:59:01 2012] [error] [client 127.0.0.1]
DistributionNotFound: UKDMindMapperApp



Am 22.05.2012 03:53, schrieb Graham Dumpleton:
> As asked before where is UKDMindMapperApp normally loaded from? I
> don't see anything in sys.path which specifically identifies where it
> may be.
> 
> Are you sure it isn't being picked up from a directory on personal
> PYTHONPATH environment setting in your account when run from command
> line and that isn't being picked up under Apache. That or was Python
> finding it out of the current working directory when run from command
> line, in which case that directory needs to also be added to sys.path.
> 
> Graham
> 
> On 22 May 2012 11:41, Tamer Higazi <[email protected]> wrote:
>> I double checked, apache is capable to access the directory, and red all
>> dirs:
>>
>>
>> tamer@office
>> /storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages $ ls -lA
>> insgesamt 32
>> -rw-r--r-- 1 tamer tamer  412 22. Mai 00:23 easy-install.pth
>> drwxr-xr-x 4 tamer tamer 4096 22. Mai 00:21 pip-1.0.2-py2.7.egg
>> drwxr-xr-x 6 tamer tamer 4096 22. Mai 00:23
>> pymongo-2.2-py2.7-linux-x86_64.egg
>> drwxr-xr-x 4 tamer tamer 4096 22. Mai 00:22 pyramid-1.3.2-py2.7.egg
>> drwxr-xr-x 4 tamer tamer 4096 22. Mai 00:23 pyramid_jinja2-1.3-py2.7.egg
>> drwxr-xr-x 4 tamer tamer 4096 22. Mai 00:21 setuptools-0.6c11-py2.7.egg
>> drwxr-xr-x 4 tamer tamer 4096 22. Mai 00:22 zope.deprecation-4.0.0-py2.7.egg
>> drwxr-xr-x 4 tamer tamer 4096 22. Mai 00:22
>> zope.interface-4.0.0-py2.7-linux-x86_64.egg
>>
>>

-- 
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