PromtEngineer / localGPT

Chat with your documents on your local device using GPT models. No data leaves your device and 100% private.
Apache License 2.0
20.09k stars 2.24k forks source link

ValueError: check_hostname requires server_hostname #522

Open Zephyruswind opened 1 year ago

Zephyruswind commented 1 year ago

(localGPT) PS D:\projects_llm\lgpt> python ingest.py 2023-09-24 19:02:54,798 - INFO - ingest.py:123 - Loading documents from D:\projects_llm\lgpt/SOURCE_DOCUMENTS 2023-09-24 19:03:01,172 - INFO - ingest.py:132 - Loaded 7 documents from D:\projects_llm\lgpt/SOURCE_DOCUMENTS 2023-09-24 19:03:01,173 - INFO - ingest.py:133 - Split into 250 chunks of text 2023-09-24 19:03:03,490 - INFO - SentenceTransformer.py:66 - Load pretrained SentenceTransformer: hkunlp/instructor-large Traceback (most recent call last): File "D:\projects_llm\lgpt\ingest.py", line 161, in main() File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\click\core.py", line 1157, in call return self.main(args, kwargs) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\click\core.py", line 783, in invoke return __callback(args, kwargs) File "D:\projects_llm\lgpt\ingest.py", line 136, in main embeddings = HuggingFaceInstructEmbeddings( File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\langchain\embeddings\huggingface.py", line 148, in init self.client = INSTRUCTOR( File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\sentence_transformers\SentenceTransformer.py", line 87, in init snapshot_download(model_name_or_path, File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\sentence_transformers\util.py", line 442, in snapshot_download model_info = _api.model_info(repo_id=repo_id, revision=revision, token=token) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(args, kwargs) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\huggingface_hub\hf_api.py", line 1697, in model_info r = get_session().get(path, headers=headers, timeout=timeout, params=params) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\requests\sessions.py", line 602, in get return self.request("GET", url, kwargs) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, kwargs) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\huggingface_hub\utils_http.py", line 63, in send return super().send(request, args, kwargs) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen self._prepare_proxy(conn) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy conn.connect() File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\urllib3\connection.py", line 359, in connect conn = self._connect_tls_proxy(hostname, conn) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\urllib3\connection.py", line 500, in _connect_tls_proxy return ssl_wrapsocket( File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\urllib3\util\ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "C:\Users\Heaven.conda\envs\localGPT\lib\site-packages\urllib3\util\ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "C:\Users\Heaven.conda\envs\localGPT\lib\ssl.py", line 512, in wrap_socket return self.sslsocket_class._create( File "C:\Users\Heaven.conda\envs\localGPT\lib\ssl.py", line 1027, in _create raise ValueError("check_hostname requires server_hostname") ValueError: check_hostname requires server_hostname

Anodiy commented 1 year ago

'urllib3==1.26.6'

Zephyruswind commented 1 year ago

'urllib3==1.26.6'

Already use the latest requirements which covers urllib3==1.26.6, however, the error is reported based on 'urllib3==1.26.6'

conda list ..... urllib3 1.26.6 pypi_0 pypi uvicorn 0.23.2 pypi_0 pypi validators 0.22.0 pypi_0 pypi

sgf0156 commented 11 months ago

urllib3==1.25.11