Did it make any difference taking out: /usr/lib/python2.6:/usr/lib/python2.6/dist-packages
Can you create a parallel hello world WSGI application as documented in: http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide Then change the hello world application to have in it: from decimal import Decimal In other words, verify whether importing that fails in context of a very simple program, with no python-path fiddles. This will take satchmo/django out of the picture. If it works, then satchmo/django causing issue or your configuration. If hello world application doesn't even work, then more serious underlying issue with Python installation and or configuration. Graham 2009/12/18 neridaj <[email protected]>: > Hey Graham, > > It looks like python 2.6 is being used: > > ldd /usr/lib/apache2/modules/mod_wsgi.so > linux-vdso.so.1 => (0x00007fff951fe000) > libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 > (0x00007fbb8ca73000) > libpthread.so.0 => /lib/libpthread.so.0 (0x00007fbb8c857000) > libdl.so.2 => /lib/libdl.so.2 (0x00007fbb8c652000) > libutil.so.1 => /lib/libutil.so.1 (0x00007fbb8c44f000) > libm.so.6 => /lib/libm.so.6 (0x00007fbb8c1ca000) > libc.so.6 => /lib/libc.so.6 (0x00007fbb8be57000) > libz.so.1 => /lib/libz.so.1 (0x00007fbb8bc3f000) > /lib64/ld-linux-x86-64.so.2 (0x00007fbb8d153000) > > > On Dec 17, 1:20 pm, Graham Dumpleton <[email protected]> > wrote: >> 2009/12/18 neridaj <[email protected]>: >> >> >> >> > I'm having problems figuring this error out. when I run python I have >> > no problems importing modules: >> >> >>>> import settings >> >>>> from decimal import Decimal >> >>>> import satchmo >> >>>> import django >> >> > python manage.py satchmo_check >> > Checking your satchmo configuration. >> > Using Django version 1.2 pre-alpha SVN-11597 >> > Using Satchmo version 0.9-pre hg-unknown >> > Your configuration has no errors. >> >> > The server log, however, show this: >> >> > [Wed Dec 16 17:10:39 2009] [error] /usr/lib/python2.6/dist-packages/ >> > psycopg2/__init__.py:54: RuntimeWarning: can't import decimal module >> > probably needed by _psycopg >> > [Wed Dec 16 17:10:39 2009] [error] RuntimeWarning) >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] mod_wsgi >> > (pid=3916): Exception occurred processing WSGI script '/home/username/ >> > public_html/mysite.com/mysite.wsgi'. >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] Traceback >> > (most recent call last): >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] File "/ >> > home/username/public_html/mysite.com/mysite.wsgi", line 15, in >> > application >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] return >> > _application(environ, start_response) >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] File "/ >> > usr/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line >> > 230, in __call__ >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] >> > self.load_middleware() >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] File "/ >> > usr/lib/python2.6/dist-packages/django/core/handlers/base.py", line >> > 42, in load_middleware >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] raise >> > exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' >> > % (mw_module, e) >> > [Wed Dec 16 17:10:40 2009] [error] [client 174.143.172.222] >> > ImproperlyConfigured: Error importing middleware >> > satchmo_store.shop.SSLMiddleware: "cannot import name Decimal" >> >> > I've setup my vhost config and wsgi script as described in the >> > documentation: >> >> > <VirtualHost *:8080> >> >> > ServerName mysite.com >> > ServerAdmin [email protected] >> > ServerAliaswww.mysite.com >> >> > DocumentRoot /home/username/public_html >> >> > WSGIScriptAlias / /usr/local/www/wsgi/mysite.wsgi >> > WSGIDaemonProcess mysite.com threads=5 display-name=%{GROUP} python- >> > path=/usr/lib/python2.6:/usr/lib/python2.6/dist-packages >> >> Remove: >> >> /usr/lib/python2.6:/usr/lib/python2.6/dist-packages >> >> You should never need to references the Python standard library directories. >> >> What do you get if you run: >> >> ldd mod_wsgi.so >> >> on the installed mod_wsgi Apache module .so file? >> >> One possibility is that mod_wsgi isn't actually compiled against >> Python 2.6 and you have wrongly tried to force it to use Python 2.6 by >> adding those directories. You can't do that and will cause lots of >> problems. The 'ldd' command will indicate which Python is being used. >> >> So, lets first verify which Python installation mod_wsgi is compiled to use. >> >> Graham >> >> > :/home/ >> > username/src/satchmo-trunk/satchmo/apps/keyedcache:/home/username/src/ >> > satchmo-trunk/satchmo/apps/l10n:/home/username/src/satchmo-trunk/ >> > satchmo/apps/livesettings:/home/username/src/satchmo-trunk/satchmo/ >> > apps/livesettings:/home/username/src/satchmo-trunk/satchmo/apps/ >> > payment:/home/username/src/satchmo-trunk/satchmo/apps/product:/home/ >> > username/src/satchmo-trunk/satchmo/apps/satchmo_ext:/home/username/rc/ >> > satchmo-trunk/satchmo/apps/satchmo_store:/home/username/src/satchmo- >> > trunk/satchmo/apps/satchmo_utils:/home/username/src/satchmo-trunk/ >> > satchmo/apps/shipping:/home/username/src/satchmo-trunk/satchmo/apps/ >> > tax >> > WSGIProcessGroup mysite.com >> >> > <Directory /usr/local/www/wsgi> >> > Order allow,deny >> > Allow from all >> > </Directory> >> >> > # Custom log file locations >> > LogLevel info >> > ErrorLog /home/username/public_html/mysite.com/logs/error.log >> > CustomLog /home/username/public_html/mysite.com/logs/access.log >> > combined >> >> > XSendFile on >> > XSendFileAllowAbove on >> >> > RPAFenable On >> > RPAFsethostname On >> > RPAFproxy_ips 127.0.0.1 >> >> > </VirtualHost> >> >> > Thanks for any suggestions, >> >> > J >> >> > -- >> >> > 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 >> > athttp://groups.google.com/group/modwsgi?hl=en. >> >> > > -- > > 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. > > > -- 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.
