This commit is contained in:
JonatanRek
2024-10-05 22:09:49 +02:00
parent 3ffdef8ced
commit 87e5768da4
+8 -7
View File
@@ -10,9 +10,10 @@ root_api_url = 'http://{}/local'.format(sever)
base_path = '/app/data/'
print("API_ROOT: " + str(root_api_url))
time.sleep(900)
#try:
while True:
try:
while True:
r = requests.get('{}/anonymize'.format(root_api_url))
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')
print(r.text)
@@ -60,9 +61,9 @@ while True:
time.sleep(900)
# except Exception as e:
# print("An exception occurred")
# print(str(e))
except Exception as e:
print("An exception occurred")
print(str(e))
# data = {"trace": str(e)}
# response = requests.post('{}/log'.format(root_api_url), json=data)
data = {"trace": str(e)}
response = requests.post('{}/log'.format(root_api_url), json=data)