python request.post raise unexpected eof while reading

Viewed 82

i was upgraded recent version pyopenssl package in django project after that request.post raise eof while reading error

import requests
headers = {
    'Content-Type': 'application/json',
    'someheader': 'SOMEVALUE',
}
json_value = {
    'value1': 'value1',
    'value2': 'value2',
}
url = 'https://url.s.o/m/e/u/r/l/'
res = requests.post(url, json=json_value, headers=headers)

this code raise error [('SSL routines', '', 'unexpected eof while reading')]

i use

python 3.6
Django==2.1.2
pyopenssl==22.0.0
requests==2.27.1
openssl==1.1.1f

how can i solve it?

0 Answers
Related