Skip to content

Commit

Permalink
Update axis_ptz_controller.py
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Jan 16, 2025
1 parent 598a6d7 commit 5f4e00d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion axis-ptz-controller/axis_ptz_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import ast
from datetime import datetime
import json
from json import JSONDecodeError

import math
import logging
import threading
Expand Down Expand Up @@ -380,7 +382,7 @@ def decode_payload(
try:
json_payload = json.loads(payload)
data_payload = json_payload[data_payload_type]
except (KeyError, TypeError) as e:
except (KeyError, TypeError, JSONDecodeError, json.JSONDecodeError) as e:
logging.error(f"Error: {e}")
logging.error(json_payload)
logging.error(
Expand Down

0 comments on commit 5f4e00d

Please sign in to comment.