You are correct. This shouldn't cause a 500 error. Please file a ticket and
we'll take a look at it.

-Chris

On Fri, Jan 1, 2010 at 1:51 AM, ManofPhysics <[email protected]>wrote:

> I have figured out. But I think there is a bug,  the quantity of the
> product is a Unicode character when someone add a product in the cart.
> The satchmo should give a warning.
>
> On Jan 1, 1:18 am, ManofPhysics <[email protected]> wrote:
> > the 404 Error Handler is ok.
> >
> > On Jan 1, 1:12 am, ManofPhysics <[email protected]> wrote:
> >
> > > If the quantity of the product is a Unicode character, I get
> > > UnicodeEncodeError at /add/. When I set DEBUG = False, the satchmo
> > > can't handle 500 error, it can't return an HttpResponse object, I find
> > > the following in the apache error log.
> >
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124] mod_wsgi
> > > (pid=10523): Exception occurred processing WSGI script '/etc/httpd/
> > > conf.d/wubianjie.wsgi'.
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124] Traceback
> > > (most recent call last):
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > etc/httpd/conf.d/wubianjie.wsgi", line 34, in application[Thu Dec 31
> > > 23:05:31 2009] [error] [client 192.168.123.124]     return _application
> > > (environ, start_response)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/core/handlers/
> > > wsgi.py", line 241, in __call__
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]
> > > response = self.get_response(request)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/core/handlers/
> > > base.py", line 134, in get_response
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > self.handle_uncaught_exception(request, resolver, exc_info)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/core/handlers/
> > > base.py", line 166, in handle_uncaught_exception
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > callback(request, **param_dict)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/views/
> > > defaults.py", line 24, in server_error
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > http.HttpResponseServerError(t.render(Context({})))
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 178, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > self.nodelist.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 779, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]
> > > bits.append(self.render_node(node, context))
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 792, in render_node
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > node.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > loader_tags.py", line 97, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > compiled_parent.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 178, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > self.nodelist.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 779, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]
> > > bits.append(self.render_node(node, context))
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 792, in render_node
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > node.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > loader_tags.py", line 24, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     result
> > > = self.nodelist.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 779, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]
> > > bits.append(self.render_node(node, context))
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 792, in render_node
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > node.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > loader_tags.py", line 24, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     result
> > > = self.nodelist.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 779, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]
> > > bits.append(self.render_node(node, context))
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 792, in render_node
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     return
> > > node.render(context)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > __init__.py", line 936, in render
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     dict =
> > > func(*args)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/Satchmo-1.0_pre-py2.5.egg/
> > > satchmo_store/shop/templatetags/satchmo_util.py", line 179, in
> > > satchmo_language_selection_form
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]
> > > request = context['request']
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]   File "/
> > > opt/python-2.5.4/lib/python2.5/site-packages/django/template/
> > > context.py", line 44, in __getitem__
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124]     raise
> > > KeyError(key)
> > > [Thu Dec 31 23:05:31 2009] [error] [client 192.168.123.124] KeyError:
> > > 'request'
> >
> > > my setting.py
> >
> > > Satchmo: 1.0-pre hg-unknown
> > > django:1.1.1
> >
> > > TEMPLATE_LOADERS = (
> > >     'django.template.loaders.filesystem.load_template_source',
> > >     'django.template.loaders.app_directories.load_template_source',
> > >     'django.template.loaders.eggs.load_template_source',
> > > )
> >
> > > MIDDLEWARE_CLASSES = (
> > >     'django.middleware.common.CommonMiddleware',
> > >     'django.contrib.sessions.middleware.SessionMiddleware',
> > >     'django.middleware.locale.LocaleMiddleware',
> > >     'django.contrib.auth.middleware.AuthenticationMiddleware',
> > >     'django.middleware.doc.XViewMiddleware',
> > >     'threaded_multihost.middleware.ThreadLocalMiddleware',
> > >     'satchmo_store.shop.SSLMiddleware.SSLRedirect',
> > >     'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
> > > )
> >
> > > TEMPLATE_CONTEXT_PROCESSORS = (
> > >     'django.core.context_processors.auth',
> > >     'django.core.context_processors.media',
> > >     'django.core.context_processors.request',
> > >     'satchmo_store.shop.context_processors.settings',
> > >     'django.core.context_processors.i18n',
> > >     'snapboard.views.snapboard_default_context',
> > > )
> >
> > > INSTALLED_APPS = (
> > >     'django.contrib.sites',
> > >     'satchmo_store.shop',
> > >     'django.contrib.admin',
> > >     'django.contrib.admindocs',
> > >     'django.contrib.auth',
> > >     'django.contrib.contenttypes',
> > >     'django.contrib.comments',
> > >     'django.contrib.sessions',
> > >     'django.contrib.sitemaps',
> > >     'registration',
> > >     'sorl.thumbnail',
> > >     'satchmo_store',
> > >     'keyedcache',
> > >     'livesettings',
> > >     'satchmo_store.contact',
> > >     'satchmo_store.contact.supplier',
> > >     'satchmo_utils',
> > >     'satchmo_utils.thumbnail',
> > >     'l10n',
> > >     'shipping',
> > >     'tax',
> > >     'satchmo_ext.wishlist',
> > >     'satchmo_ext.productratings',
> > >     'payment',
> > >     'payment.modules.purchaseorder',
> > >     'product',
> > >     'shipping.modules.tiered',
> > >     'satchmo_ext.product_feeds',
> > >     'app_plugins',
> > >     'django.contrib.flatpages',
> > >     'mailer',
> > >     'django_extensions',
> > > )
> >
> > > thanks
>
> --
>
> 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.


Reply via email to