Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

unknown encoding: idna #93

Closed
pykaso opened this Issue Sep 20, 2012 · 3 comments

Comments

Projects
None yet
2 participants

pykaso commented Sep 20, 2012

Python 2.7
Windows7 x64

Error:
http: error: LookupError: unknown encoding: idna

Owner

jakubroztocil commented Sep 21, 2012

Please run the command with --debug and post the whole command and output here.

pykaso commented Oct 12, 2012

Configuration:

Python 2.7 32-bit
Windows7 x64

e:\deploy\python\Scripts>http.exe google.com --debug

Result:

HTTPie 0.3.0
HTTPie data: C:\Users\pykaso\AppData\Roaming\httpie
Requests 0.14.0
Pygments 1.5
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] win32

requests.request({'allow_redirects': False,
'auth': None,
'config': {'base_headers': {'Accept': '/',
'Accept-Encoding': 'identity, deflate, compress, gz
ip',
'User-Agent': 'HTTPie/0.3.0'}},
'data': OrderedDict(),
'files': OrderedDict(),
'headers': {},
'method': 'get',
'params': ParamDict(),
'prefetch': False,
'proxies': {},
'timeout': 30,
'url': 'http://google.com',
'verify': True})

Traceback (most recent call last):
File "e:\deploy\python\Scripts\http-script.py", line 8, in
load_entry_point('httpie==0.3.0', 'console_scripts', 'http')()
File "build\bdist.win32\egg\httpie\core.py", line 79, in main
File "build\bdist.win32\egg\httpie\client.py", line 28, in get_response
File "e:\deploy\python\lib\site-packages\requests-0.14.0-py2.7.egg\requests\sa
fe_mode.py", line 39, in wrapped
return function(method, url, *_kwargs)
File "e:\deploy\python\lib\site-packages\requests-0.14.0-py2.7.egg\requests\ap
i.py", line 51, in request
return session.request(method=method, url=url, *_kwargs)
File "e:\deploy\python\lib\site-packages\requests-0.14.0-py2.7.egg\requests\se
ssions.py", line 252, in request
r.send(prefetch=prefetch)
File "e:\deploy\python\lib\site-packages\requests-0.14.0-py2.7.egg\requests\mo
dels.py", line 490, in send
url = self.full_url
File "e:\deploy\python\lib\site-packages\requests-0.14.0-py2.7.egg\requests\mo
dels.py", line 399, in full_url
netloc = netloc.encode('idna').decode('utf-8')
LookupError: unknown encoding: idna

Owner

jakubroztocil commented Apr 27, 2014

Please re-open if the issue persists with the latest HTTPie version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment