UnicodeEncodeError
Python 2.4.4: /home/mewshop_beta/local/bin/python
Thu Jul 29 19:05:44 2010

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /home/.rumhead/mewshop_beta/beta2.mewshop.com/fcgi.py in run(self=<fcgi.Request object>)
  578         """Runs the handler, flushes the streams, and ends the request."""
  579         try:
  580             protocolStatus, appStatus = self.server.handler(self)
  581         except:
  582             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <fcgi.Request object>, self.server = <fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <fcgi.WSGIServer object>>
 /home/.rumhead/mewshop_beta/beta2.mewshop.com/fcgi.py in handler(self=<fcgi.WSGIServer object>, req=<fcgi.Request object>)
 1264         try:
 1265             try:
 1266                 result = self.application(environ, start_response)
 1267                 try:
 1268                     for data in result:
result = None, self = <fcgi.WSGIServer object>, self.application = <django.core.handlers.wsgi.WSGIHandler object>, environ = {'DH_USER': 'mewshop_beta', 'DOCUMENT_ROOT': '/home/mewshop_beta/beta2.mewshop.com', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.mewshop.com', ...}, start_response = <function start_response>
 /usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py in __call__(self=<django.core.handlers.wsgi.WSGIHandler object>, environ={'DH_USER': 'mewshop_beta', 'DOCUMENT_ROOT': '/home/mewshop_beta/beta2.mewshop.com', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.mewshop.com', ...}, start_response=<function start_response>)
  243                 # Apply response middleware
  244                 for middleware_method in self._response_middleware:
  245                     response = middleware_method(request, response)
  246                 response = self.apply_response_fixes(request, response)
  247         finally:
response = <django.http.HttpResponseNotFound object>, middleware_method = <bound method FlatpageFallbackMiddleware.process...es.middleware.FlatpageFallbackMiddleware object>>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
 /usr/lib/python2.4/site-packages/django/contrib/flatpages/middleware.py in process_response(self=<django.contrib.flatpages.middleware.FlatpageFallbackMiddleware object>, request=<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, response=<django.http.HttpResponseNotFound object>)
    8             return response # No need to check for a flatpage for non-404 responses.
    9         try:
   10             return flatpage(request, request.path_info)
   11         # Return the original response if any errors happened. Because this
   12         # is a middleware, we can't assume the errors will be caught elsewhere.
global flatpage = <function flatpage>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, request.path_info = u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News'
 /usr/lib/python2.4/site-packages/django/contrib/flatpages/views.py in flatpage(request=<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, url=u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News')
   21     """
   22     if not url.endswith('/') and settings.APPEND_SLASH:
   23         return HttpResponseRedirect("%s/" % request.path)
   24     if not url.startswith('/'):
   25         url = "/" + url
global HttpResponseRedirect = <class 'django.http.HttpResponseRedirect'>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, request.path = u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News'
 /usr/lib/python2.4/site-packages/django/http/__init__.py in __init__(self=<django.http.HttpResponseRedirect object>, redirect_to=u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/')
  405     def __init__(self, redirect_to):
  406         HttpResponse.__init__(self)
  407         self['Location'] = redirect_to
  408 
  409 class HttpResponsePermanentRedirect(HttpResponse):
self = <django.http.HttpResponseRedirect object>, redirect_to = u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/'
 /usr/lib/python2.4/site-packages/django/http/__init__.py in __setitem__(self=<django.http.HttpResponseRedirect object>, header='Location', value=u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/')
  318 
  319     def __setitem__(self, header, value):
  320         header, value = self._convert_to_ascii(header, value)
  321         self._headers[header.lower()] = (header, value)
  322 
header = 'Location', value = u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/', self = <django.http.HttpResponseRedirect object>, self._convert_to_ascii = <bound method HttpResponseRedirect._convert_to_ascii of <django.http.HttpResponseRedirect object>>
 /usr/lib/python2.4/site-packages/django/http/__init__.py in _convert_to_ascii(self=<django.http.HttpResponseRedirect object>, *values=('Location', u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/'))
  307             if isinstance(value, unicode):
  308                 try:
  309                     value = value.encode('us-ascii')
  310                 except UnicodeError, e:
  311                     e.reason += ', HTTP response headers must be in US-ASCII format'
value = u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/', value.encode = <built-in method encode of unicode object>

UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 29: ordinal not in range(128), HTTP response headers must be in US-ASCII format
      args = ('ascii', u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/', 29, 30, 'ordinal not in range(128)')
      encoding = 'ascii'
      end = 30
      object = u'/news/categories/news/Mewshop\u2019s Got the Right Stuff/News/'
      reason = 'ordinal not in range(128), HTTP response headers must be in US-ASCII format'
      start = 29