cognitive_face.util.CognitiveFaceException: Error when calling Cognitive Face API:
cognitive_face.util.CognitiveFaceException: Error when calling Cognitive Face API: status_code: 401 code: Unspecified message: Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key.
Have you found the solution?
You need to get the subscription key from Microsoft Azure face api portal
I get the subscription key from Microsoft Azure face api portal but still not working, same problem arise as mention above.
I get the subscription key from Microsoft Azure face api portal but still not working, same problem arise as mention above.
HAVE you found the solution....
No i have'nt get the solution.. i m doing final year project on this topic. First i use opencv but did not get good accuracy so plz help me.
Rupesh
On Wed, 20 Mar 2019 8:12 pm Abhijith Cherath, [email protected] wrote:
I get the subscription key from Microsoft Azure face api portal but still not working, same problem arise as mention above.
HAVE you found the solution....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/malharsk27/Autoattendance-Cognitive/issues/6#issuecomment-474854438, or mute the thread https://github.com/notifications/unsubscribe-auth/AiFN_NOo0Ws2BuGetIPNdUjCaeFC6pECks5vYkVUgaJpZM4T7Jef .
im also facing the same problem can someone help me out
Add this line of code in everyfile where key is there BASE_URL = 'https://westus.api.cognitive.microsoft.com/face/v1.0/' # Replace with your regional Base URL CF.BaseUrl.set(BASE_URL)
@harshmalik Bro i added those two lines but still facing the same error.Please share the edited piece of code if possible
@harshmalik https://github.com/harshmalik can we use your subscription key in our project or not?
On Fri, Mar 29, 2019 at 9:03 AM ragashvad [email protected] wrote:
@harshmalik https://github.com/harshmalik Bro i added those two lines but still facing the same error.Please share the edited piece of code if possible
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/malharsk27/Autoattendance-Cognitive/issues/6#issuecomment-477851456, or mute the thread https://github.com/notifications/unsubscribe-auth/AiFN_D64wHEegTJ_4w7gmMn0_rqzkqP3ks5vbYYOgaJpZM4T7Jef .
-- Rupesh
@harshmalik after adding those 2 lines I got error like this Traceback (most recent call last): File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/connection.py", line 159, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw) File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/util/connection.py", line 57, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 343, in _make_request self._validate_conn(conn) File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn conn.connect() File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/connection.py", line 301, in connect conn = self._new_conn() File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/connection.py", line 168, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f49fe678be0>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/home/saurabh/.virtualenvs/cv/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='india.api.cognitive.microsoft.com', port=443): Max retries exceeded with url: /face/v1.0/persongroups/test1/persons (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49fe678be0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "create_person.py", line 12, in
can you help me out
After adding those line on the code, i still get the problem listed below.
Traceback (most recent call last):
File "/home/rupesh/PycharmProjects/Autoattendance-Cognitive-master/identify.py", line 37, in