AZURE Cognitive Serivces -> KeyError: 'Endpoint'



我正在使用Mocrosoft Docs(https://learn.microsoft.com/es-es/azure/cognitive-services/computer-vision/quickstarts-sdk/python-sdk(中发布的用于计算机视觉的SDK(Python(。

当我运行代码时,会发生此错误:

回溯(最近一次调用(:

File "c:/analyze_image_local.py", line 68, in <module>

description_result = computervision_client.describe_image_in_stream(local_image)

File "C:Anaconda3libsite-packagesazurecognitiveservicesvisioncomputervisionoperations_computer_vision_client_operations.py", line 1202, in describe_image_in_stream
request = self._client.post(url, query_parameters, header_parameters, body_content)

File "C:Anaconda3libsite-packagesmsrestservice_client.py", line 193, in post

request = self._request('POST', url, params, headers, content, form_content)

File "C:Anaconda3libsite-packagesmsrestservice_client.py", line 108, in _request

request = ClientRequest(method, self.format_url(url))

File "C:Anaconda3libsite-packagesmsrestservice_client.py", line 155, in format_url

base = self.config.base_url.format(**kwargs).rstrip('/')
KeyError: 'Endpoint'

我宁愿使用REST API方法(https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts/python-disk(

但是,使用此命令行完成端点可能很有用: analyze_url = 端点 + "视觉/v2.1/分析">

只需运行以下命令即可重新安装自定义视觉 SDK 对我有用。

pip uninstall azure-cognitiveservices-vision-customvision
pip install azure-cognitiveservices-vision-customvision

相关内容

  • 没有找到相关文章

最新更新