question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

requests.exceptions.SSLError: [Errno 8] _ssl.c:507: EOF occurred in violation of protocol

See original GitHub issue
HTTPie 1.0.0-dev
HTTPie data: /Users/kaji/.httpie
Requests 2.5.3
Pygments 2.0.2
Python 2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] darwin
Not every SSL website shows though. So, it is tricky. From browser , it is working fine.

>>> requests.request({'allow_redirects': False,
 'auth': None,
 'cert': None,
 'data': OrderedDict(),
 'files': DataDict(),
 'headers': {'User-Agent': 'HTTPie/1.0.0-dev'},
 'method': 'get',
 'params': ParamsDict(),
 'proxies': {},
 'stream': True,
 'timeout': 30,
 'url': u'https://apissl.example.com',
 'verify': True})

Traceback (most recent call last):
  File "/usr/local/bin/http", line 9, in <module>
    load_entry_point('httpie==1.0.0-dev', 'console_scripts', 'http')()
  File "/Library/Python/2.7/site-packages/httpie/core.py", line 112, in main
    response = get_response(args, config_dir=env.config.directory)
  File "/Library/Python/2.7/site-packages/httpie/client.py", line 41, in get_response
    response = requests_session.request(**kwargs)
  File "/Library/Python/2.7/site-packages/requests/sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
  File "/Library/Python/2.7/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Python/2.7/site-packages/requests/adapters.py", line 431, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 8] _ssl.c:507: EOF occurred in violation of protocol

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
sigmavirus24commented, Feb 28, 2015

Try

$ pip install --force-reinstall requests[security]

@kajisaap please email me the URL so I can give you better help with this. My email is on my profile page.

4reactions
xgt001commented, Oct 21, 2016

I was able to resolve this by doing what @sigmavirus24 suggested

pip install --force-reinstall requests[security] This was with python 2.7.10 on macOS Sierra 10.12

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python requests.exceptions.SSLError: EOF occurred in ...
Tried above and urlopen showed tls_version as 1.2 but still I get the same error : ssl.SSLEOFError: EOF occurred in violation of protocol...
Read more >
[Errno 8] _ssl.c:504: EOF occurred in violat - YouTube
PYTHON : Python Requests requests. exceptions. SSLError : [ Errno 8 ] _ssl.c:504: EOF occurred in violation of protocol [ Gift : Animated...
Read more >
“SSLError: EOF occurred in violation of protocol” Exception ...
I try to access the IBM Hyperledger Blockchain from python. Unfortunately I get an SSL Protocol error while trying to connect.
Read more >
CSDN博客_requests caused by sslerror(ssleoferror(8, 'eof oc
python requests (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1. 千年恨 已于 2022-03-08 21:21:16 修改 7665 ...
Read more >
requests.exceptions.SSLError: [Errno 8] _ssl.c:507: EOF occurred in ...
requests.exceptions.SSLError: [Errno 8] _ssl.c:507: EOF occurred in violation of protocol. httpie. 28 February 2015 Posted by kaji-bikash.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found