Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x000001ADFB066CC0>: Failed to resolve 'https' ([Errno 11001] getaddrinfo failed) #167

Open
YiYangabc opened this issue Aug 15, 2024 · 1 comment

Comments

@YiYangabc
Copy link

I am running the prepare_db.py file by this command line: python .\app\backend\vi_search\prepare_db.py
I was able to generate the prompt component, but got error when it got to the azure AI search, when it tried to create_db. (line 137 in prepared_db.by)

Error message below:
prepare_db(db_name, DATA_DIR, language_models, prompt_content_db, verbose=verbose)
File "C:\Users\yiyang1\video indexer sample\azure-video-indexer-samples\VideoQnA-Demo\app\backend\vi_search\prepare_db.py", line 137, in prepare_db
prompt_content_db.create_db(db_name, vector_search_dimensions=embeddings_size)
File "C:\Users\yiyang1\video indexer sample\azure-video-indexer-samples\VideoQnA-Demo\app\backend\vi_search\prompt_content_db\azure_search.py", line 74, in create_db
search_client = self.create_new_search_index(name, vector_search_dimensions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\video indexer sample\azure-video-indexer-samples\VideoQnA-Demo\app\backend\vi_search\prompt_content_db\azure_search.py", line 158, in create_new_search_index
if name in self.get_available_dbs():
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\video indexer sample\azure-video-indexer-samples\VideoQnA-Demo\app\backend\vi_search\prompt_content_db\azure_search.py", line 109, in get_available_dbs
indexes = [index for index in indexes]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\paging.py", line 123, in next
return next(self._page_iterator)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\paging.py", line 75, in next
self._response = self._get_next(self.continuation_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\search\documents\indexes_generated\operations_indexes_operations.py", line 500, in get_next
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 229, in run
return first_node.send(pipeline_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 86, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 86, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 86, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline\policies_redirect.py", line 197, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline\policies_retry.py", line 554, in send
raise err
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline\policies_retry.py", line 532, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 86, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 86, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 86, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline_base.py", line 118, in send
self._sender.send(request.http_request, **request.context.options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yiyang1\AppData\Local\Programs\Python\Python312\Lib\site-packages\azure\core\pipeline\transport_requests_basic.py", line 401, in send
raise error
azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x000001ADFB066CC0>: Failed to resolve 'https' ([Errno 11001] getaddrinfo failed)

@kenwoodjw
Copy link

You need to setup env

AZURE_OPENAI_SERVICE=""
AZURE_OPENAI_CHATGPT_DEPLOYMENT=""
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT=""

because the code use env

azure_openai_service = env_values['AZURE_OPENAI_SERVICE']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants