0

When I am running the backend server, I am getting the following error.

[25/Oct/2019 12:00:10] "OPTIONS / HTTP/1.1" 200 -
Error on request:
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 304, in run_wsgi
    execute(self.server.app)
  File "/home/user/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 297, in execute
    write(b"")
  File "/home/user/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 276, in write
    self.wfile.write(data)
  File "/usr/lib/python3.5/socket.py", line 593, in write
    return self._sock.send(b)
  File "/usr/lib/python3.5/ssl.py", line 861, in send
    return self._sslobj.write(data)
  File "/usr/lib/python3.5/ssl.py", line 586, in write
    return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1848)

Also this is the start of the flask code

@app.route('/',methods=['GET','POST'])
def responseToExtensionRequest():
    if request.method == 'POST':
        requestString = request.get_json(force=True,silent=True) # read the request as json string

        global action_window
        # global goal_score

        requestGoal = requestString.get('goal')
  • This is the error all I am getting. It is not showing even where in my code, it is going wrong – Bhanu Prakash Reddy Oct 25 '19 at 06:40
  • Do you have any proxies in network? – Kris Oct 25 '19 at 06:49
  • No I don't have any proxies – Bhanu Prakash Reddy Oct 25 '19 at 06:51
  • 1
    You should have a look on the answers here https://stackoverflow.com/questions/32115607/python-3-4-ssl-error-urlopen-error-eof-occurred-in-violation-of-protocol-ssl-c – Kris Oct 25 '19 at 06:59
  • Show us how you run the server and if there is any server configuration. – Klaus D. Oct 25 '19 at 07:00
  • I am running the backend server and frontend application both on my local machine. I run the backend using python3 server.py on host 0.0.0.0 . The actual problem is I am getting this error when I click an option in my frontend and my frontend is not able to receive anything from the backend. I am getting Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse () at XMLHttpRequest.xhttp.onreadystatechange error in frontend – Bhanu Prakash Reddy Oct 25 '19 at 07:09

0 Answers0