OAK Device unable to initialize

Creating an instance of the Oak Device CHOP and attempting to initialize an Oak camera always fails with the error message: “Error: td.tdError: Invalid DepthAI Pipeline returned by function createPipeline. The type: depthai.Pipeline unable to cast Python instance to C++ type (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)”

Running TouchDesigner version 2023.12000 on Windows 11. These Oak cameras were working in TD a few days ago with version 2023.11760, but looks like it’s now broken with the newer version.

Attempting to use Oak-D, Oak-D PoE, and Oak-D Pro PoE with the default pipeline and script as provided by the Oak Device CHOP. The CHOP can see the devices when connected with the correct serial numbers, but cannot initialize them. I’ve also confirmed the cameras all open and connect fine when using the Luxonis DepthAI example scripts downloaded from their repository.

Do you have depthai installed on your machine in another Python installation?

I do, in an Anaconda environment that isn’t accessible from within TouchDesigner.

Hi @BlindElephants,

can’t replicate this behavior. Could you just confirm the path and version of depthai which get’s used by python?

python >>> import depthai
python >>> print(depthai.__file__)
C:\Program Files\Derivative\TouchDesigner.2023.12000\bin\Lib\site-packages\depthai.cp311-win_amd64.pyd
python >>> depthai.__version__
'2.24.0.0.dev0+7b57b28305368582d004d5c6ec2cffb66562f2e0'

cheers
Markus

Hi @BlindElephants.

Just to say, I was having this issue too. I ran:
import depthai as dai
print(‘depthai version:’, dai.version)
print(‘depthai location:’, dai.file)
inside of a text DAT and it showed that Touch was pointing to a DepthAI installation I had accidentally installed in a base environment of my conda install.

I had been playing around on a deadline trying to get a custom-trained model working without Touch, and thought it may be worth mentioning this quick check as it allowed me to very quickly solve the issue by simply deleting all those depthai install files from the conda env and doing a pip uninstall.