Fixed, I had to remove the python-path directive. On Dec 17, 2:22 pm, neridaj <[email protected]> wrote: > Hey Chris, > > I've had the satchmo site up for about a month, so everything was > working fine until I added another vhost. I'm running nginx in front > of apache2/wsgi and when I added another vhost for a different django > project I was getting import errors for the new site but the satchmo > site continued to work fine. Upon adding the python-path directive for > the WSGIDaemonProcess the import problem with the non satchmo site was > fixed but the satchmo site stopped working. I tried commenting out the > SSL middleware but I still get ImportError: cannot import name > Decimal: > > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] > ImportError: cannot import name Decimal > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] mod_wsgi > (pid=8566): Exception occurred processing WSGI script '/usr/local/www/ > wsgi/mysite.wsgi'. > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] Traceback > (most recent call last): > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/local/www/wsgi/mysite.wsgi", line 15, in application > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] return > _application(environ, start_response) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line > 241, in __call__ > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] > response = self.get_response(request) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/core/handlers/base.py", line > 73, in get_response > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] > response = middleware_method(request) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/middleware/locale.py", line 17, > in process_request > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] > translation.activate(language) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/utils/translation/__init__.py", > line 73, in activate > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] return > real_activate(language) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/utils/translation/ > trans_real.py", line 205, in activate > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] _active > [currentThread()] = translation(language) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/utils/translation/ > trans_real.py", line 194, in translation > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] > default_translation = _fetch(settings.LANGUAGE_CODE) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/utils/translation/ > trans_real.py", line 180, in _fetch > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] app = > import_module(appname) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, > in import_module > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] > __import__(name) > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/keyedcache/__init__.py", line 7, in > <module> > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] from > satchmo_utils import is_string_like, is_list_or_tuple > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/dist-packages/satchmo_utils/__init__.py", line 1, in > <module> > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] from > decimal import Decimal, ROUND_HALF_UP, InvalidOperation > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > usr/lib/python2.6/decimal.py", line 138, in <module> > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] import > numbers as _numbers > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] File "/ > home/username/src/satchmo-trunk/satchmo/apps/satchmo_utils/ > numbers.py", line 1, in <module> > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] from > decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, InvalidOperation, > getcontext > [Thu Dec 17 14:13:52 2009] [error] [client 174.143.172.222] > ImportError: cannot import name Decimal > > On Dec 17, 1:09 pm, Chris Moffitt <[email protected]> wrote: > > > I remember a while back when someone else was having problems with > > Postgresql, they were getting some odd errors. Can you confirm that your > > postgresql environment is up and working properly? > > > If you remove the SSL middleware, does everything else work correctly? > > > -Chris > > > On Thu, Dec 17, 2009 at 2:54 PM, neridaj <[email protected]> wrote: > > > 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:/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 > > > "Satchmo users" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<satchmo-users%[email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/satchmo-users?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "Satchmo users" 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/satchmo-users?hl=en.
