UnicodeEncodeError 하나만 도와주세요 ㅠㅠ

123 views
Skip to first unread message

민수 고

unread,
Aug 16, 2011, 8:02:50 AM8/16/11
to Python 3 질문 게시판
고수님들 안녕하세요.

파이썬 3 프로그래밍 이라는 책을 보고 공부하다가,
UnicodeEncodeError에 시달려서 급기야 질문게시판까지 왔습니다.
django로 프로젝트 waguwagu라는 프로젝트를 만들어서 단순한 검색페이지를 만들려고 합니다.

링크된 페이지에 가시면,
http://ryan0802.tistory.com/attachment/cfile...@1853B34B4E4A5BD11A2626.7z


/var/www/waguwagu 에 있던 파일들을 압축해서 올려놨습니다.

환경은
PyLucene 3.3
이구요.

python manage.py runserver 한 다음에
localhost:8000
에 접속해서

검색창에 아무거나 한글로 입력하면
아래와 같은 에러가 납니다..

어디서 유니코드 인코드 에러가 나는걸까요?
당최 모르겠습니다. ㅠㅠ

분명 waguwagu/search/search_views.py
아니면,
waguwagu/BlogSearcher.py
둘 중에 하나에서 발생하는걸로보입니다.

그런데 이게 어느 파일에서 나는 에러다가 아니라,
에러 메시지가 파이썬 기본 파일들에서 보이니까 당최 해결을 못하겠어요 ㅠㅠ
고수님들 제발 도와주세요!!


Traceback (most recent call last):

File "/usr/lib/pymodules/python2.7/django/core/servers/basehttp.py",
line 280, in run
self.result = application(self.environ, self.start_response)

File "/usr/lib/pymodules/python2.7/django/core/servers/basehttp.py",
line 674, in __call__
return self.application(environ, start_response)

File "/usr/lib/pymodules/python2.7/django/core/handlers/wsgi.py", line
248, in __call__
response = self.get_response(request)

File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py", line
141, in get_response
return self.handle_uncaught_exception(request, resolver,
sys.exc_info())

File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py", line
165, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)

File "/usr/lib/pymodules/python2.7/django/views/debug.py", line 59, in
technical_500_response
html = reporter.get_traceback_html()

File "/usr/lib/pymodules/python2.7/django/views/debug.py", line 126,
in get_traceback_html
'exception_value': smart_unicode(self.exc_value, errors='replace'),

File "/usr/lib/pymodules/python2.7/django/utils/encoding.py", line 39,
in smart_unicode
return force_unicode(s, encoding, strings_only, errors)

File "/usr/lib/pymodules/python2.7/django/utils/encoding.py", line 66,
in force_unicode
s = unicode(s)

UnicodeEncodeError: 'ascii' codec can't encode characters in position
22-24: ordinal not in range(128)

Reply all
Reply to author
Forward
0 new messages