{"id":45085,"library":"harvesters","title":"Harvesters","description":"Harvesters is an image acquisition library for GenICam-based machine vision cameras. It provides a Pythonic interface to GenICam GenTL producers, supporting multiple transport layers (USB3 Vision, GigE Vision, etc.). Current version 1.4.3, released December 2022. Maintained by the GenICam community.","status":"active","version":"1.4.3","language":"python","source_language":"en","source_url":"https://github.com/genicam/harvesters","tags":["machine-vision","genicam","image-acquisition","camera"],"install":[{"cmd":"pip install harvesters","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Provides GenICam GenTL support for harvesters.","package":"genicam","optional":true},{"reason":"Used for image buffer handling.","package":"numpy","optional":true}],"imports":[{"note":"Harvester is in the 'core' submodule, not package root.","wrong":"from harvesters import Harvester","symbol":"Harvester","correct":"from harvesters.core import Harvester"}],"quickstart":{"code":"from harvesters.core import Harvester\nimport os\n\ncti_file = os.environ.get('GENICAM_GENTL64_PATH', 'path/to/cti/file.cti')\nh = Harvester()\nh.add_file(cti_file)\nh.update_device_info_list()\nif len(h.device_info_list) > 0:\n    ia = h.create_image_acquirer(0)\n    ia.start_image_acquisition()\n    with ia.fetch_buffer() as buffer:\n        print(f'Buffer acquired: {buffer.width}x{buffer.height}')\n    ia.stop_image_acquisition()\n    ia.destroy()\nh.reset()","lang":"python","description":"Initialize harvester, connect to first camera, acquire one buffer."},"warnings":[{"fix":"Set GENICAM_GENTL64_PATH to the directory containing your .cti file, or use h.add_file('/path/to/producer.cti').","message":"Harvester does not manage GenTL transport layers; you must provide a .cti file (producer) path via environment variable GENICAM_GENTL64_PATH or add it manually.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use 'with ia.fetch_buffer() as buffer:' to ensure buffer is valid.","message":"Buffer objects are only valid inside a 'with' block. Accessing buffer data outside will raise an error or return invalid data.","severity":"gotcha","affected_versions":"all"},{"fix":"Always call h.update_device_info_list() after adding files and before accessing device_info_list.","message":"In version 1.4.x, the 'Harvester' class requires explicit call to 'update_device_info_list()' before creating an image acquirer. Older versions may have automatically refreshed.","severity":"breaking","affected_versions":">=1.4.0"}],"env_vars":null,"search_vec":"'1.4.3':35 '2022':38 'acquisit':6,50 'base':11 'camera':14,51 'communiti':43 'current':33 'decemb':37 'etc':32 'genicam':10,21,42,47 'genicam-bas':9 'gentl':22 'gige':30 'harvest':1,2 'imag':5,49 'image-acquisit':48 'interfac':19 'layer':27 'librari':7 'machin':12,45 'machine-vis':44 'maintain':39 'multipl':25 'produc':23 'provid':16 'python':18 'releas':36 'support':24 'transport':26 'usb3':28 'version':34 'vision':13,29,31,46","created_at":"2026-06-07T12:53:17.324553+00:00","updated_at":"2026-06-07T12:53:17.324553+00:00","problems":[{"fix":"Check if GENICAM_GENTL64_PATH is set correctly and contains a .cti file. Verify camera is connected and powered. Call h.update_device_info_list() after adding file.","cause":"No GenTL producer loaded or no cameras detected. The GENICAM_GENTL64_PATH environment variable may not point to a valid .cti file or no cameras are connected.","error":"harvesters.core.HarvesterError: No devices found"},{"fix":"Install latest version: pip install --upgrade harvesters. Then import from harvesters.core import Harvester.","cause":"The harvesters package was imported incorrectly or an older version without the core module.","error":"AttributeError: module 'harvesters' has no attribute 'core'"},{"fix":"Ensure ia.start_image_acquisition() is called before fetch_buffer, and the camera is configured to trigger or stream continuously.","cause":"The fetch_buffer() call waited too long for an image buffer. This can happen if camera is not streaming or acquisition not started.","error":"RuntimeError: Buffer timed out"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/genicam/harvesters","github":"https://github.com/genicam/harvesters","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}