Hi, I have deployed a Vm on Azure which is currently running on

Last login: Mon Jun 24 00:23:22 2024 from
azureuser@Yolo-ssh:~$ sudo docker run --net=host roboflow/roboflow-inference-server-cpu:latest
INFO: Started server process [6]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on (Press CTRL+C to quit)

I tried making inference to drowsiness-detection and i keep on getting this error
File “/app/inference/core/roboflow_api.py”, line 54, in raise_from_lambda
raise exception_type(message) from inner_error
inference.core.exceptions.RoboflowAPINotAuthorizedError: Unauthorized access to roboflow API - check API key. Visit Authentication | Roboflow Docs to learn how to retrieve one.
INFO: - “POST /drive-drowsiness-detection/2 HTTP/1.1” 401 Unauthorized

I changed http to https but it gives this error too

File “C:\Users\Kremlin\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py”, line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘’, port=9001): Max retries exceeded with url: /drive-drowsiness-detection/2 (Caused by SSLError(SSLError(1, ‘[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1006)’)))
PS D:\GITHUB\PLD> & C:/Users/Kremlin/AppData/Local/Programs/Python/Python311/python.exe d:/GITHUB/PLD/Vmyolo.py

this is my code

import requests

dataset_id = “drive-drowsiness-detection”
version_id = “2”
image_url = “D:\GITHUB\PLD\Yolo\Images\70ECB75E-C03B-4A30-BBB9-EC4B74E84037 - Gloria Larbi.jpeg”

api_key = “**********”
confidence = 0.5

url = f"{dataset_id}/{version_id}"

data = {
“api_key”: api_key,
“confiden}e”: confidence,
“image”: image_url,

headers = {
“Content-Type”: “application/x-www-form-urlencoded”

res = requests.post(url, data=data, headers=headers)


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.