You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API Key Permission denied error; HTTPError at 401 Client Error: PermissionDenied for url: https://westus2.api.cognitive.microsoft.com/vision/v2.0/read/core/asyncBatchAnalyze?language=unk&detectOrientation=true
#16
Open
sidharthrai opened this issue
Jan 5, 2022
· 2 comments
I was hoping if you can help me. I was trying to run the DeepRule repo. I have ran it before; it was working just fine. I tried using it recently, I'm getting the stated error below.
When I give the command python manage.py runserver 8800
the upload photo page works fine but when I upload a photo, the following error shows up.
On Terminal
We met some errors!
Internal Server Error: /
Traceback (most recent call last):
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/sidharth/Documents/DeepRule2/server_match/view.py", line 30, in get_group
plot_area, image_painted, data, chart_data = test('static/target.png', min_value_official=min_value, max_value_official=max_value)
File "/home/sidharth/Documents/DeepRule2/test_pipeline.py", line 232, in test
title2string, min_value, max_value = try_math(image_path, cls_info)
File "/home/sidharth/Documents/DeepRule2/test_pipeline.py", line 164, in try_math
word_infos = ocr_result(image_path)
File "/home/sidharth/Documents/DeepRule2/test_pipeline.py", line 130, in ocr_result
response.raise_for_status()
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: PermissionDenied for url: https://westus2.api.cognitive.microsoft.com/vision/v2.0/read/core/asyncBatchAnalyze?language=unk&detectOrientation=true
[05/Jan/2022 15:01:43] "POST / HTTP/1.1" 500 114613
BTW it API and key are in the ocr.py file.
My best guess is, the error coming because this project is using some Microsoft API and the key written in the system expired starting of 2022. Please let me know if that is the case or if I'm missing something. I will appreciate it if you can help. Please let me know if you have any questions for me.
The text was updated successfully, but these errors were encountered:
sidharthrai
changed the title
401 Client Error: PermissionDenied for url: https://westus2.api.cognitive.microsoft.com/vision/v2.0/read/core/asyncBatchAnalyze?language=unk&detectOrientation=true
API KeyPermission denied
Jan 5, 2022
sidharthrai
changed the title
API KeyPermission denied
API Key Permission denied error; HTTPError at 401 Client Error: PermissionDenied for url: https://westus2.api.cognitive.microsoft.com/vision/v2.0/read/core/asyncBatchAnalyze?language=unk&detectOrientation=true
Jan 5, 2022
Is there any way around running the code without using the Microsoft OCR key?
Can we skip it?
Or by any chance can you update the code with a new key?
Thank you so much.
Hi All,
I was hoping if you can help me. I was trying to run the DeepRule repo. I have ran it before; it was working just fine. I tried using it recently, I'm getting the stated error below.
When I give the command
python manage.py runserver 8800
the upload photo page works fine but when I upload a photo, the following error shows up.
On Website
HTTPError at
401 Client Error: PermissionDenied for url: https://westus2.api.cognitive.microsoft.com/vision/v2.0/read/core/asyncBatchAnalyze?language=unk&detectOrientation=true
On Terminal
We met some errors!
Internal Server Error: /
Traceback (most recent call last):
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/sidharth/Documents/DeepRule2/server_match/view.py", line 30, in get_group
plot_area, image_painted, data, chart_data = test('static/target.png', min_value_official=min_value, max_value_official=max_value)
File "/home/sidharth/Documents/DeepRule2/test_pipeline.py", line 232, in test
title2string, min_value, max_value = try_math(image_path, cls_info)
File "/home/sidharth/Documents/DeepRule2/test_pipeline.py", line 164, in try_math
word_infos = ocr_result(image_path)
File "/home/sidharth/Documents/DeepRule2/test_pipeline.py", line 130, in ocr_result
response.raise_for_status()
File "/home/sidharth/anaconda3/envs/DeepRule/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: PermissionDenied for url: https://westus2.api.cognitive.microsoft.com/vision/v2.0/read/core/asyncBatchAnalyze?language=unk&detectOrientation=true
[05/Jan/2022 15:01:43] "POST / HTTP/1.1" 500 114613
BTW it API and key are in the ocr.py file.
My best guess is, the error coming because this project is using some Microsoft API and the key written in the system expired starting of 2022. Please let me know if that is the case or if I'm missing something. I will appreciate it if you can help. Please let me know if you have any questions for me.
The text was updated successfully, but these errors were encountered: