How to use the pypylon.genicam.AccessException function in pypylon

To help you get started, we’ve selected a few pypylon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NMGRL / pychron / pychron / image / basler_pylon_camera.py View on Github external
dev = cfg.get('Device')
            if dev:

                for k, v in dev.get('PylonParameters', {}).items():
                    try:
                        setattr(self._cam, k, v)
                        self.debug('Set {} to {}'.format(k, v))
                    except ValueError as e:
                        self.warning('Invalid Property value. k="{}",v={}. e={}'.format(k, v, e))
                    except KeyError:
                        self.warning('Invalid Camera Property "{}"'.format(k))
                    except RuntimeError as e:
                        self.warning('RunTimeError: {}. k={},v={}'.format(e, k, v))
                    except IOError as e:
                        self.warning('IOError: {}, k={}, v={}'.format(e, k, v))
                    except genicam.AccessException as e:
                        self.warning('Access Exception {}'.format(e))

            self.pixel_depth = self._cam.PixelDynamicRangeMax.Value
            self._cam.StartGrabbing(pylon.GrabStrategy_LatestImageOnly)