basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
575 stars 208 forks source link

BUG: cannot connect to blaze-101 via pypylon #789

Open Baehn opened 1 month ago

Baehn commented 1 month ago

Describe the issue:

i cannot use pypylon to connect to my blaze-101 cams, see below, connecting via harvester works.

Reproduce the code example:

python3 /opt/pylon/share/pylon/Samples/blaze/Python/pypylon/SimpleGrab/simple_grab.py

Error message:

Traceback (most recent call last):
  File "/opt/pylon/share/pylon/Samples/blaze/Python/pypylon/SimpleGrab/simple_grab.py", line 17, in <module>
    camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice(dc))
  File "/home/akidu/.local/lib/python3.10/site-packages/pypylon/pylon.py", line 1734, in CreateFirstDevice
    return _pylon.TlFactory_CreateFirstDevice(self, *args)
_genicam.RuntimeException: Cannot provide XML file. Failed to open GenTL device. Error: ID could not be connected to a resource (fffffc11) : RuntimeException thrown (file 'PylonGtcTL.cpp', line 320)

Is your camera operational in Basler pylon viewer on your platform

Yes

Hardware setup & camera model(s) used

Ubuntu 22.04.3 LTS blaze-101

Runtime information:

import sys, pypylon.pylon, platform
print(f'python: {sys.version}')
print(f'platform: {sys.platform}/{platform.machine()}/{platform.release()}')
print(f'pypylon: {pypylon.pylon.__version__} / {".".join([str(i) for i in pypylon.pylon.GetPylonVersion()])}')
Baehn commented 1 month ago

correct Runtime information: python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] platform: linux/x86_64/6.5.0-15-generic pypylon: 4.0.0 / 8.0.0.10

SMA2016a commented 1 week ago

you need to install pylon and Supplementary package in addition. After installing the Supplementary package, try this

dc = pylon.DeviceInfo() dc.SetDeviceClass("BaslerGTC/Basler/GenTL_Producer_for_Basler_blaze_101_cameras") camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice(dc)) camera.Open()