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

KeyError: 'Endpoint' #19936

Closed
autohnnaveen opened this issue Jul 26, 2021 · 4 comments
Closed

KeyError: 'Endpoint' #19936

autohnnaveen opened this issue Jul 26, 2021 · 4 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Cognitive - Computer Vision customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team no-recent-activity There has been no recent activity on this issue. Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@autohnnaveen
Copy link

I am using the SDK (Python) for Computer Vision published in Mocrosoft Docs

https://github.com/MicrosoftLearning/mslearn-ai900/blob/main/05%20-%20Optical%20Character%20Recognition.ipynb
When I run the code, this error occurs:

read_response = computervision_client.read(read_image_url, raw=True)

KeyError Traceback (most recent call last)
in
----> 1 read_response = computervision_client.read(read_image_url, raw=True)

C:\ProgramData\Anaconda3\lib\site-packages\azure\cognitiveservices\vision\computervision\operations_computer_vision_client_operations.py in read(self, url, language, pages, model_version, reading_order, custom_headers, raw, **operation_config)
842
843 # Construct and send request
--> 844 request = self._client.post(url, query_parameters, header_parameters, body_content)
845 response = self._client.send(request, stream=False, **operation_config)
846

C:\ProgramData\Anaconda3\lib\site-packages\msrest\service_client.py in post(self, url, params, headers, content, form_content)
191 :param dict form_content: Form content
192 """
--> 193 request = self._request('POST', url, params, headers, content, form_content)
194 return request
195

C:\ProgramData\Anaconda3\lib\site-packages\msrest\service_client.py in _request(self, method, url, params, headers, content, form_content)
106 :param dict form_content: Form content
107 """
--> 108 request = ClientRequest(method, self.format_url(url))
109
110 if params:

C:\ProgramData\Anaconda3\lib\site-packages\msrest\service_client.py in format_url(self, url, **kwargs)
153 if not parsed.scheme or not parsed.netloc:
154 url = url.lstrip('/')
--> 155 base = self.config.base_url.format(**kwargs).rstrip('/')
156 url = urljoin(base + '/', url)
157 return url

KeyError: 'Endpoint'

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 26, 2021
@rakshith91
Copy link
Contributor

@autohnnaveen Thanks for the issue, we’ll investigate asap

@rakshith91 rakshith91 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jul 27, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 27, 2021
@rakshith91 rakshith91 added Cognitive - Computer Vision and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 27, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jul 27, 2021
@rakshith91 rakshith91 added the Service Attention Workflow: This issue is responsible by Azure service team. label Jul 27, 2021
@ghost
Copy link

ghost commented Jul 27, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ryogok, @TFR258, @tburns10.

Issue Details

I am using the SDK (Python) for Computer Vision published in Mocrosoft Docs

https://github.com/MicrosoftLearning/mslearn-ai900/blob/main/05%20-%20Optical%20Character%20Recognition.ipynb
When I run the code, this error occurs:

read_response = computervision_client.read(read_image_url, raw=True)

KeyError Traceback (most recent call last)
in
----> 1 read_response = computervision_client.read(read_image_url, raw=True)

C:\ProgramData\Anaconda3\lib\site-packages\azure\cognitiveservices\vision\computervision\operations_computer_vision_client_operations.py in read(self, url, language, pages, model_version, reading_order, custom_headers, raw, **operation_config)
842
843 # Construct and send request
--> 844 request = self._client.post(url, query_parameters, header_parameters, body_content)
845 response = self._client.send(request, stream=False, **operation_config)
846

C:\ProgramData\Anaconda3\lib\site-packages\msrest\service_client.py in post(self, url, params, headers, content, form_content)
191 :param dict form_content: Form content
192 """
--> 193 request = self._request('POST', url, params, headers, content, form_content)
194 return request
195

C:\ProgramData\Anaconda3\lib\site-packages\msrest\service_client.py in _request(self, method, url, params, headers, content, form_content)
106 :param dict form_content: Form content
107 """
--> 108 request = ClientRequest(method, self.format_url(url))
109
110 if params:

C:\ProgramData\Anaconda3\lib\site-packages\msrest\service_client.py in format_url(self, url, **kwargs)
153 if not parsed.scheme or not parsed.netloc:
154 url = url.lstrip('/')
--> 155 base = self.config.base_url.format(**kwargs).rstrip('/')
156 url = urljoin(base + '/', url)
157 return url

KeyError: 'Endpoint'

Author: autohnnaveen
Assignees: -
Labels:

Cognitive - Computer Vision, Service Attention, bug, customer-reported, needs-team-attention

Milestone: -

@lmazuel
Copy link
Member

lmazuel commented Aug 2, 2021

Hi @autohnnaveen
I believe your issue is because the endpoint your passed was incorrect, did you pass the default value of the notebook YOUR_COG_ENDPOINT or did you changed it to an actual value?

I think with a proper value this would go away (though I don't deny the error could be better).

@lmazuel lmazuel added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Aug 2, 2021
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Aug 10, 2021
@ghost
Copy link

ghost commented Aug 10, 2021

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost closed this as completed Aug 24, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue Aug 18, 2022
Review request for Microsoft.ContainerService to add version 2022-07-02-preview (Azure#20062)

* Adds base for updating Microsoft.ContainerService from version preview/2022-06-02-preview to version 2022-07-02-preview

* Updates readme

* Updates API version in new specs and examples

* update readmes (Azure#19872)

* Add example of Azure KeyVault Secrets Provider Addon for 2022-07-02-preview (Azure#19874)

* add example of kv secret provider addon

* fix

* fix lint

* move ADH GA type to preview (Azure#19904)

* move ADH GA type to preview

* fix prettier check issue

* add overlay vpa swagger (Azure#19936)

* add overlay vpa objects

* fix typo

* address comments

Co-authored-by: zhifanhui <zhifanhui@microsoft.com>

* Swagger API for Operation Abort (Azure#19971)

* Swagger API for Operation Abort

* Swagger changes updates for Abort operation based on validations

* Haitao/secured by perimeter0702 (Azure#19873)

* add SecuredByPerimeter in publicNetworkAccess

* update enum value descriptions

* Add support for ImageCleaner on AKS (Azure#19916)

* Add support for ImageCleaner on AKS

* add more context in ImageCleaner description

* add default for availableAgentPoolVersions (Azure#19902)

* Add Azure Monitor Metrics (Prometheus) Profile (Azure#19965)

* Add Azure Monitor Metrics (Prometheus) Profile

* spelling error

* restructure to names from rp

* commit to rerun build

* ksm metrics

Co-authored-by: Jianping Zeng <zjpjack@users.noreply.github.com>
Co-authored-by: huizhifan <60024380+huizhifan@users.noreply.github.com>
Co-authored-by: zhifanhui <zhifanhui@microsoft.com>
Co-authored-by: InduSridhar <InduSridhar@users.noreply.github.com>
Co-authored-by: Haitao Chen <haitch@users.noreply.github.com>
Co-authored-by: jiashun0011 <573255300@qq.com>
Co-authored-by: bragi92 <kadubey@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Cognitive - Computer Vision customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team no-recent-activity There has been no recent activity on this issue. Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants