Posted by heilkitty ![]() |
|
While creating blog post with cyrillic (i.e., non-ascii) title I got this error message: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/public_html/my-site/communitydraft/community/apps/communitytools/sphenecoll/sphene/sphboard/views.py", line 342, in post newpost.save(additional_data = data) File "/home/public_html/my-site/communitydraft/community/apps/communitytools/sphenecoll/sphene/sphboard/models.py", line 862, in save self.category.get_category_type().save_post(self, additional_data) File "/home/public_html/my-site/communitydraft/community/apps/communitytools/sphenecoll/sphene/sphblog/categorytypes.py", line 92, in save_post 'changesURL': ''.join((url, blog_feed_url),) } ) File "/usr/lib/python2.6/urllib.py", line 1265, in urlencode v = quote_plus(str(v)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128) <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {u'category': [u'2'], u'body': [u'\u041c\u044b\u0444\u0441\u0435\u0443\u043c\u0440\u0451\u043c'], u'tags': [u''], u'attachment-fileupload': [u''], u'choicesPerUser': [u'1'], u'question': [u''], u'answers': [u''], u'status': [u'2'], u'addmonitor': [u'1'], u'slug': [u''], u'subject': [u'\u0410\u0430\u0430']}>, COOKIES:{'sessionid': '0f6fa4bedbac6cf4d8363c1cbe590f8d'}, META:{'CONTENT_LENGTH': '1065', 'CONTENT_TYPE': 'multipart/form-data; boundary=----------BuJnruREd8eOgAKDWXCrhM', 'HTTP_ACCEPT': 'text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1', 'HTTP_ACCEPT_CHARSET': 'iso-8859-1, utf-8, utf-16, *;q=0.1', 'HTTP_ACCEPT_ENCODING': 'deflate, gzip, x-gzip, identity, *;q=0', 'HTTP_ACCEPT_LANGUAGE': 'ru,en;q=0.9', 'HTTP_CONNECTION': 'Keep-Alive, TE', 'HTTP_CONTENT_LENGTH': '1065', 'HTTP_CONTENT_TYPE': 'multipart/form-data; boundary=----------BuJnruREd8eOgAKDWXCrhM', 'HTTP_COOKIE': 'sessionid=0f6fa4bedbac6cf4d8363c1cbe590f8d', 'HTTP_COOKIE2': '$Version=1', 'HTTP_HOST': 'www.my-site', 'HTTP_REFERER': 'http://www.my-site/board/post/2/', 'HTTP_TE': 'deflate, gzip, chunked, identity, trailers', 'HTTP_USER_AGENT': 'Opera/10.00 (X11; FreeBSD 7.2-STABLE i386 ; U; ru) Presto/2.2.0', 'PATH_INFO': u'/board/post/2/', 'QUERY_STRING': '', 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME': u'', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x9e67aac>, 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x9d7d74c>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>This is a working server with python 2.6, fastcgi+nginx (via flup). While running this on localhost with python 2.5 on test built-in server, this works fine. Could it be because of python 2.6? can people stop using the internet, its getting slow for me |
|
Posted by Herbert Poul ![]() |
|
hmm.. weird.. it could be that something has changed in the way urlencode works..
but what i don't understand - shouldn't the slug filter out all non-ascii characters? have you changed the slug manually or was it autogenerated? Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by heilkitty ![]() |
|
I'm not sure if the the problem is with slug itself. Even when the slug contains ascii characters, error is still the same. However the name of the category is cyrillic ("Новости"). This error doesn't happed on python 2.5 (I've mentioned this already) and when posting to ordinary board categories. can people stop using the internet, its getting slow for me |
Please login to post a reply.