have you made sure, that all services are already running?
Also the complete py script might be interesting, or at least break the python script down to the part that causes the error.
Usually you get the error you are seeing, when there is no camera configured, the camera is already in use, the path you try to load the driver from is wrong or you have a missmatch within x86 and x64 processes.
Maybe this might also be interesting for you
Dynamically find device
import cvb
interface_flags = cvb.DiscoverFlags.UpToLevelInterface | cvb.DiscoverFlags.IgnoreGevSD
all_interfaces = cvb.DeviceFactory.discover_from_root(interface_flags)
broadcast_flags = cvb.DiscoverFlags.IgnoreVins | cvb.DiscoverFlags.IncludeInaccessible
all_devices = []
for interface in all_interfaces:
cvb.DiscoveryInformation.set_genapi_feature(interface, "TLInterface", "DisableSubnetMatch", "1")
cvb.DiscoveryInformation.set_genapi_feature(interface, "TLInterface", "AllowBroadcastDiscoveryResponse", "1")
found_devices = cvb.DeviceFactory.discover_from_level(interface.access_token, broadcast_flags)
for dev in found_devices:
all_devices.append(dev)
for dev in all_devices:
# Check devices access status etc.:
# dev.read_property(cvb.DiscoveryProperties.DeviceAccessStatus)
with cvb.DeviceFactory.open(all_devices[0].access_token) as device: # open first camera found (check accessibility before!)
# work with camera...