3dtof/voxelsdk

Python wrapper works in virtual environment, but not with PyCharm

Opened this issue · 0 comments

I needed to debug one of the python wrappers that use C++ compiled dll from VoxelSDK. Running the program from virtual environment works:

(py27) D:\VariousCodes\VoxelSDK-Calibration\calibwizard>python VxlToPng.py
WARNING: CameraSystem: Failed to load or register a depth camera factory from library ti3dtof.dll. Ignoring this library.
WARNING: CameraSystem: Failed to load or register a depth camera factory from library voxel.dll. Ignoring this library.
WARNING: CameraSystem: Ignoring Voxel library voxelpcl.dll with ABI version = 0. Expected ABI version = 34
cols=320 # added by me
rows=240 # added by me
Saved vxls/tintincdk_example_190cm.png # added by me

It gives only warnings. Here, I copied Voxel.py (SWIG-generated), Voxel.pyc, _Voxel.pyd, voxel.dll locally (to avoid confusion).

Then created project for PyCharm and copied all these files to venv folder – the GUI is showing them. Running script fails though:

WARNING: CameraSystem: Failed to load or register a depth camera factory from library voxel.dll. Ignoring this library.
ERROR: DepthCameraLibrary: Failed to load D:\VariousCodes\VoxelSDK\Instances\Build-vs14-64-FullDLL\lib\voxel\ti3dtof.dll. Error: The specified procedure could not be found.

WARNING: CameraSystem: Failed to load library D:\VariousCodes\VoxelSDK\Instances\Build-vs14-64-FullDLL\lib\voxel\ti3dtof.dll. Ignoring it.
WARNING: CameraSystem: Failed to load or register a depth camera factory from library D:\VariousCodes\VoxelSDK\Instances\Build-vs14-64-FullDLL\lib\voxel\voxel.dll. Ignoring this library.
WARNING: CameraSystem: Ignoring Voxel library D:\VariousCodes\VoxelSDK\Instances\Build-vs14-64-FullDLL\lib\voxel\voxelpcl.dll with ABI version = 0. Expected ABI version = 34
WARNING: CameraSystem: No depth camera library found or loaded.
ERROR: CameraSystem: Could not find factory for generator ID '72417281'
ERROR: FrameStreamReader: Failed to get necessary frame generators to read stream.

Process finished with exit code -1073741819 (0xC0000005)

The exit code hints that there is a clash between x86 and x64 architectures. but everything is compiled on Windows 10, x64
Looks like local voxel.dll is being looked at, and ignored. Then it complains about ti3dtof.dll (which is ignored in the first case).