Crash report
Demo
Command Line
1> python crash_report.py
2 Crash dump found on your device!
3 Saved to crashDump_0_184430102163DB0F00_3575b77f20e796b4e79953bf3d2ba22f0416ee8b.json
4 Please report to developers!Setup
Command Line
1git clone https://github.com/luxonis/depthai-python.git
2cd depthai-python/examples
3python3 install_requirements.pySource code
Python
C++
Python
PythonGitHub
1#!/usr/bin/env python3
2
3import cv2
4import depthai as dai
5from json import dump
6from os.path import exists
7
8# Connect to device and start pipeline
9with dai.Device() as device:
10
11 if device.hasCrashDump():
12 crashDump = device.getCrashDump()
13 commitHash = crashDump.depthaiCommitHash
14 deviceId = crashDump.deviceId
15
16 json = crashDump.serializeToJson()
17
18 i = -1
19 while True:
20 i += 1
21 destPath = "crashDump_" + str(i) + "_" + deviceId + "_" + commitHash + ".json"
22 if exists(destPath):
23 continue
24
25 with open(destPath, 'w', encoding='utf-8') as f:
26 dump(json, f, ensure_ascii=False, indent=4)
27
28 print("Crash dump found on your device!")
29 print(f"Saved to {destPath}")
30 print("Please report to developers!")
31 break
32 else:
33 print("There was no crash dump found on your device!")Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.