SSLEOFError: EOF occurred in violation of protocol
Opened this issue · 0 comments
Sometimes encounter traceback error but running again sometimes resolves:
SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2423)
Traceback:
File "C:\python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "C:\Users\jeremy.arbid\python_playground\web-explorer\web_explorer.py", line 85, in
result = qa_chain({"question": question},callbacks=[retrieval_streamer_cb, stream_handler])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\langchain\chains\base.py", line 243, in call
raise e
File "C:\python311\Lib\site-packages\langchain\chains\base.py", line 237, in call
self._call(inputs, run_manager=run_manager)
File "C:\python311\Lib\site-packages\langchain\chains\qa_with_sources\base.py", line 141, in _call
docs = self._get_docs(inputs, run_manager=_run_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\langchain\chains\qa_with_sources\retrieval.py", line 51, in _get_docs
docs = self.retriever.get_relevant_documents(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\langchain\schema\retriever.py", line 181, in get_relevant_documents
raise e
File "C:\python311\Lib\site-packages\langchain\schema\retriever.py", line 174, in get_relevant_documents
result = self._get_relevant_documents(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\langchain\retrievers\web_research.py", line 184, in _get_relevant_documents
search_results = self.search_tool(query, self.num_search_results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\langchain\retrievers\web_research.py", line 154, in search_tool
result = self.search.results(query_clean, num_search_results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\langchain\utilities\google_search.py", line 123, in results
results = self._google_search_results(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\langchain\utilities\google_search.py", line 63, in _google_search_results
res = cse.list(q=search_term, cx=self.google_cse_id, **kwargs).execute()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\googleapiclient_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\googleapiclient\http.py", line 923, in execute
resp, content = _retry_request(
^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\googleapiclient\http.py", line 222, in _retry_request
raise exception
File "C:\python311\Lib\site-packages\googleapiclient\http.py", line 191, in retry_request
resp, content = http.request(uri, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\httplib2_init.py", line 1724, in request
(response, content) = self.request(
^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\httplib2_init.py", line 1444, in _request
(response, content) = self.conn_request(conn, request_uri, method, body, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\site-packages\httplib2_init.py", line 1367, in _conn_request
conn.request(method, request_uri, body, headers)
File "C:\python311\Lib\http\client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\python311\Lib\http\client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\python311\Lib\http\client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\python311\Lib\http\client.py", line 1041, in _send_output
self.send(msg)
File "C:\python311\Lib\http\client.py", line 1002, in send
self.sock.sendall(data)
File "C:\python311\Lib\ssl.py", line 1241, in sendall
v = self.send(byte_view[count:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python311\Lib\ssl.py", line 1210, in send
return self._sslobj.write(data)
^^^^^^^^^^^^^^^^^^^^^^^^