리눅스에서 python 스크립트 freeze할때 에러
리눅스에서 httplib 모듈을 이용한 파이썬 스크립트를 freeze 하고, 만들어진 실행파일을 실행하면,
Unhandled exception in thread started by
Traceback (most recent call last):
File "/root/xxxxx.py", line 44, in func_xxxxxx
---------- 코드 생략 ------------
File "/root/xxxxx.py", line 39, in func_xxxxxx
doc = conn.getresponse()
File "/usr/local/lib/python2.4/httplib.py", line 804, in request
self._send_request(method, url, body, headers)
File "/usr/local/lib/python2.4/httplib.py", line 821, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/lib/python2.4/httplib.py", line 754, in putrequest
self.putheader('Host', "%s:%s" % (self.host.encode("idna"), self.port))
LookupError: unknown encoding: idna
이런 에러가 난다. -_-;;
idna 인코딩을 알 수 없다니;;;
구글링 해보다가 찾은 답변...
from encodings import idna, ascii
인코딩을 임포트하라고 한다;;;
하니 되네.... 원래 그렇게 해야 하는건가? -_-;;