Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown encoding: idna #93

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

unknown encoding: idna #93

pykaso opened this issue Sep 20, 2012 · 3 comments
Labels
bug Something isn't working

Comments

@pykaso
Copy link

pykaso commented Sep 20, 2012

Python 2.7
Windows7 x64

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

@jkbrzt
Copy link
Member

jkbrzt commented Sep 21, 2012

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

@pykaso
Copy link
Author

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 <module>
    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

@jkbrzt
Copy link
Member

jkbrzt commented Apr 27, 2014

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

@jkbrzt jkbrzt closed this as completed Apr 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants