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

Errors while adding gpt-vision in the application and ingestion with Content Understanding. #2218

Open
mrisahoo1 opened this issue Dec 10, 2024 · 3 comments · May be fixed by #2225
Open

Errors while adding gpt-vision in the application and ingestion with Content Understanding. #2218

mrisahoo1 opened this issue Dec 10, 2024 · 3 comments · May be fixed by #2225
Assignees
Labels

Comments

@mrisahoo1
Copy link

mrisahoo1 commented Dec 10, 2024

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

scripts/prepdocs.ps1

Any log messages given by the failure

Traceback (most recent call last):
File "C:\Users\WKK9OUQ\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\connector.py", line 1335, in _create_direct_connection
hosts = await self._resolve_host(host, port, traces=traces)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\WKK9OUQ\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\connector.py", line 989, in _resolve_host
return await asyncio.shield(resolved_host_task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\WKK9OUQ\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\connector.py", line 1020, in _resolve_host_with_throttle
addrs = await self._resolver.resolve(host, port, family=self._family)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\WKK9OUQ\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\resolver.py", line 38, in resolve
infos = await self._loop.getaddrinfo(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\WKK9OUQ\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 864, in getaddrinfo
return await self.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\WKK9OUQ\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\WKK9OUQ\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 961, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 11001] getaddrinfo failed

The above exception was the direct cause of the following exception:
Error1:
Traceback (most recent call last):
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocs.py", line 439, in
loop.run_until_complete(main(ingestion_strategy, setup_index=not args.remove and not args.removeall))
File "C:\Users\User1\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocs.py", line 242, in main
await strategy.setup()
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocslib\filestrategy.py", line 91, in setup
await cu_manager.create_analyzer()
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocslib\mediadescriber.py", line 70, in create_analyzer
async with session.put(
File "C:\Users\User1\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\client.py", line 1360, in aenter
self._resp: _RetType = await self._coro
^^^^^^^^^^^^^^^^
File "C:\Users\User1\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\client.py", line 663, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User1\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\connector.py", line 538, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User1\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\connector.py", line 1050, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User1\Desktop\mco-search-vision.venv\Lib\site-packages\aiohttp\connector.py", line 1341, in _create_direct_connection
raise ClientConnectorDNSError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorDNSError: Cannot connect to host cu-apb4bgfgsz2di.cognitiveservices.azure.com:443 ssl:default [getaddrinfo failed]

Error2:
After the above error is resolved

Traceback (most recent call last):
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocs.py", line 439, in
loop.run_until_complete(main(ingestion_strategy, setup_index=not args.remove and not args.removeall))
File "C:\Users\User1\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocs.py", line 242, in main
await strategy.setup()
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocslib\filestrategy.py", line 91, in setup
await cu_manager.create_analyzer()
File "C:\Users\User1\Desktop\mco-search-vision\app\backend\prepdocslib\mediadescriber.py", line 78, in create_analyzer
raise Exception("Error creating analyzer", data)
Exception: ('Error creating analyzer', '{"error":{"code":"API endpoint does not match resource","message":"API called multimodalintelligence-2024-12-01-preview not matching any APIs in resource."}}')

Error 3:
Traceback (most recent call last):
File "C:\Users\WKK9OUQ\Desktop\search-mco\app\backend\prepdocs.py", line 439, in
loop.run_until_complete(main(ingestion_strategy, setup_index=not args.remove and not args.removeall))
File "C:\Users\WKK9OUQ\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\WKK9OUQ\Desktop\search-mco\app\backend\prepdocs.py", line 242, in main
await strategy.setup()
File "C:\Users\WKK9OUQ\Desktop\search-mco\app\backend\prepdocslib\filestrategy.py", line 91, in setup
await cu_manager.create_analyzer()
File "C:\Users\WKK9OUQ\Desktop\search-mco\app\backend\prepdocslib\mediadescriber.py", line 78, in create_analyzer
raise Exception("Error creating analyzer", data)
Exception: ('Error creating analyzer', '{"error":{"code":"404","message": "Resource not found"}}')

Expected/desired behavior

Should run the ingestion script. But I cannot find multimodalintelligence in the code repo.
Also it is not able to create the analyzer as resource is not found. But it it there

OS and Version?

Windows 11

azd version?

azd version 1.11.0 (commit 5b92e0687e1fa96dfc8292f4b900c0c58610b6a5)

Versions

Mention any other details that might be useful

The Error1 gets resolved when I go outside of the secure network. All other resources work normally in this network.
The Error2 pops up after I am outside the secure network and trying to run the ingestion script.
The Error3 is now coming where I have purged all resources and added the location for the Services according to my needs but it still says resource not found.
Please help me out with this.


Thanks! We'll be in touch soon.

@pamelafox pamelafox linked a pull request Dec 11, 2024 that will close this issue
@pamelafox pamelafox added the vnet label Dec 11, 2024
@pamelafox pamelafox self-assigned this Dec 11, 2024
@pamelafox
Copy link
Collaborator

Ah, if this is private endpoint related, I've found that we didn't configure that properly. Can you try the fix from my PR here? #2225

Thanks for filing!

@mrisahoo1
Copy link
Author

mrisahoo1 commented Dec 12, 2024

Hi Pamela,
Thank you for your response. I tried it again with the One change you suggested in the main.bicep file.
Are there any other changes I need to make?
I have tried setting up the Content Understanding Service on Sweden Central, West Europe and East US. Not working in all three of there and gives the same error.
But I am getting the same error still:
Traceback (most recent call last):
File "C:\Users\User1\Desktop\search-mco\app\backend\prepdocs.py", line 439, in
loop.run_until_complete(main(ingestion_strategy, setup_index=not args.remove and not args.removeall))
File "C:\Users\WKK9OUQ\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\User1\Desktop\search-mco\app\backend\prepdocs.py", line 242, in main
await strategy.setup()
File "C:\Users\User1\Desktop\search-mco\app\backend\prepdocslib\filestrategy.py", line 91, in setup
await cu_manager.create_analyzer()
File "C:\Users\User1\Desktop\search-mco\app\backend\prepdocslib\mediadescriber.py", line 78, in create_analyzer
raise Exception("Error creating analyzer", data)
Exception: ('Error creating analyzer', '{"error":{"code":"404","message": "Resource not found"}}')

@mrisahoo1
Copy link
Author

Also, I have deployed the service of Container Apps for hosting the Application, do I have to do it in App Service instead of Container Apps ?

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

Successfully merging a pull request may close this issue.

2 participants