Your script sets Width, Height and PixelFormat on the camera, calls start_acquisition, and fetch_buffer dies with genicam.gentl.InvalidParameterException, 'Parameter not valid or out of range' with ID -1009, before any image code of yours runs. The producer's log prints lines such as 'GenTL producer does not implement DSGetBufferPartInfo'. The frames are arriving; the failure is in how the consumer describes them. This guide shows you how to read the producer's capability warnings, how to compute the buffer geometry a single-part producer must deliver, and how to apply the three fixes — consumer update, buffer info declaration, CTI update — in the order that clears the exception.
Why does fetch_buffer fail with -1009 parameter not valid?
The exception ID -1009 is the invalid-parameter status your GenTL producer returned when the consumer asked it for a buffer info — the width or height of the delivered buffer — and the producer has no implementation for that query, so it cannot answer and your frame never reaches the code.
The traceback shows exactly where. The last frames are the GenTL binding's height inquiry — genicam/gentl.py calling Buffer__get_height — reached from _to_np_array in harvesters/core.py, which turns the delivered buffer into a numpy array. Your code never executed; the with-block on fetch_buffer failed while the payload object was being built from a buffer the producer had already delivered.
GenTL splits the work: your consumer (Harvester here) asks, the producer module loaded from the camera's CTI file answers. The standard defines buffer info queries such as width and height, and — optionally — part info queries for producers that fill multi-part buffers. Part support is optional. A consumer that assumes the full set asks anyway; a producer without the function answers with its generic invalid-parameter status, and the binding raises InvalidParameterException instead of returning a number.
Which producer log lines confirm the cause?
Look for two warnings printed when the consumer loads the CTI and opens the device — 'GenTL producer does not implement DSGetNumBufferParts' and 'GenTL producer does not implement DSGetBufferPartInfo' — they mean the producer delivers single-part buffers only and cannot describe the geometry of what it hands over.
Five lines typically print at load time: IFGetParentTL, DevGetParentIF, DSGetParentDev, DSGetNumBufferParts and DSGetBufferPartInfo. The first three are parent-interface plumbing that no consumer needs on this path, so ignore them. The deciding pair is the last two: DSGetNumBufferParts asks how many parts the producer fills per buffer, and DSGetBufferPartInfo asks each part for width, height and offset. A producer lacking both hands over one undivided buffer per frame — which is exactly the geometry you can compute yourself.
A CTI that loads cleanly but still lists no devices is a different fault with its own validation order — follow the empty device list fix.
Is this the same fault as a missing chunk-data width?
No — the two look alike because both break on buffer metadata, but a missing chunk width is a value the producer never filled on a chunk payload, while here the producer refuses the info query outright and returns invalid-parameter -1009 instead of a value.
Three crash signatures meet at fetch_buffer, and the traceback text tells you which one you have:
| Traceback signature | What fails | Where the fix goes |
|---|---|---|
| InvalidParameterException, ID -1009, 'Error Inquire buffer info' | Consumer asks a buffer info the producer never implemented | Consumer declaration or producer CTI |
| Buffer width not available on a chunk payload | Producer delivers the buffer but leaves the width info unfilled | Request the right payload type |
| padding_y not implemented | Consumer and producer disagree on line padding | Align consumer and producer |
If the width comes back as not available on chunk payloads, the payload type is the problem; the chunk payload type fix sorts it. If the crash complains that padding_y is not implemented, follow the padding_y fetch-crash fix. The -1009 signature is the third case: the query itself was refused, and the cure is to stop asking or to upgrade the side that answers.
What geometry does a single-part buffer carry?
Expect a single part spanning the whole buffer: width and height equal to the camera's Width and Height nodes and one plane per frame, so the delivered size is width × height × bytes per pixel — 26,214,400 bytes, 25 MiB, for a 5120 × 5120 Mono8 frame.
Worked example, with the values the failing script set: Width = 5120, Height = 5120, PixelFormat = Mono8.
- 5120 px × 5120 px = 26,214,400 pixels
- 26,214,400 px × 1 B/px = 26,214,400 B
- 26,214,400 B ÷ 1,048,576 B/MiB = 25.0 MiB exactly
Pixel format moves the total linearly. Mono12packed at 1.5 B/px gives 39,321,600 B (37.5 MiB); RGB8 at 3 B/px gives 78,643,200 B (75 MiB). The same width × height × bytes-per-pixel sum is what comes out wrong when a Mono16 buffer arrives with half the elements you expect — the Mono16 payload fix walks that arithmetic.
How do you fix the -1009 exception?
Fix it in this order: update the consumer to a release that handles producers without part support, declare the buffer info so it asks only supported queries, and install the producer's current CTI — the first one alone stops the -1009.
- Update the consumer. Install a current Harvester release, 1.3 or later. Current releases read the capability report at load time, skip part-geometry queries on producers without DSGetBufferPartInfo, and build the payload from the whole-buffer width and height together with the camera's node map. On the reported 1.2.8 stack this alone is the cure.
- Declare the buffer info you need. From 1.3, the create_image_acquirer call accepts buffer info options — buffer_info and parts. List only what this producer supports: whole-buffer width and height, nothing part-shaped. The consumer then never asks a query the producer can refuse.
- Update the producer. Install the camera maker's current CTI from the maker or its distributor. A newer producer may implement DSGetBufferPartInfo outright, and then any consumer works.
- Prove it on one frame. The capability lines may still print, but fetch_buffer now returns, and the check below confirms the geometry you computed.
from harvesters.core import Harvester
h = Harvester()
h.add_cti_file("/path/to/producer.cti") # the CTI your camera maker installs
h.update()
ia = h.create_image_acquirer(serial_number="S0123456") # your camera's serial
ia.remote_device.node_map.Width.value = 5120
ia.remote_device.node_map.Height.value = 5120
ia.remote_device.node_map.PixelFormat.value = "Mono8"
ia.start_acquisition(run_in_background=False)
with ia.fetch_buffer(timeout=1) as buffer:
component = buffer.payload.components[0]
print(component.width, component.height) # 5120 5120 proves the fix
ia.stop_acquisition()
ia.destroy()
h.reset()
The with-block hands the buffer back to the producer's queue when it exits, so copy any data you keep out of it first — the buffer queue fix explains the hand-back.
How do you stop it coming back on the next camera or PC?
Pin the pair that has to agree — consumer release and producer CTI — and retest them together whenever either changes, because a consumer that declares its buffer info cannot be broken by a producer update, but a bare consumer can be broken from either side.
Record both versions with the deployment, and keep the load-time capability report as your smoke test: the warnings you expect should be exactly the warnings you get, and a new 'does not implement' line means the producer changed underneath you. Re-run the single-frame test after any camera or PC swap — the exception costs one fetch to catch at the bench and a full shift to catch in the cell. The same two sides can disagree in other ways too: when devices disappear from the list instead of frames failing to fetch, the empty camera list fix covers that matching problem.
Does hardware fix it, or is this purely software?
This fault is pure software: no camera, lens, cable or network upgrade adds DSGetBufferPartInfo to a producer that lacks it, so replace hardware only when the producer's CTI has no current release at all.
Decide by the producer's support status, not by the hardware:
- Producer has a current CTI: stay on the camera. Update the producer, update or declare in the consumer, and the station keeps running with nothing on the bench changed.
- Producer is frozen at an old CTI: keep the declared consumer as the workaround and plan the camera swap at the next station revision, so the fleet returns to a maintained stack.
- Frames vanish or arrive incomplete instead of crashing: that is transport, not metadata. Packet loss shows up as empty components, and the GigE stability fix handles that side.
When the swap does come, pick the camera first from the current area scan cameras range, then match the interface hardware from the frame grabbers category; the camera configurator walks the pairing step by step. If a GenTL stack still misbehaves with consumer and CTI both current, send us the capability report and the full traceback through the contact page. More integration fixes of this kind live on the systems topic page.
Questions
What does GenTL status ID -1009 mean?
It is the invalid-parameter status: a function in the GenTL interface was called with a parameter it considers not valid or out of range. The code alone does not name the failing query, so pair the exception with the traceback frame that shows the buffer height inquiry and with the producer's capability warnings printed at CTI load. Together those three tell you which info call to remove.
Do I have to replace the camera to clear -1009?
No. The fault sits in the software stack: the consumer asked for an optional GenTL query the producer's CTI does not implement. A consumer update, a buffer info declaration or the producer's current CTI clears it. Replace hardware only when the producer has no current CTI at all and no consumer release can declare around the missing functions.
Why do 'GenTL producer does not implement' warnings still print after the fix?
Those lines are the producer's capability report, not faults. A GenTL producer announces the optional functions it lacks while it loads, and a current consumer reads the report and simply avoids the missing queries. The parent-interface lines never affect image delivery; only the pair DSGetNumBufferParts and DSGetBufferPartInfo changes behavior, and only on consumers that do not handle their absence.
Can I reshape the raw buffer myself with numpy instead of upgrading?
Not on the version that throws. The exception is raised inside fetch_buffer while the payload object is built, before the buffer is handed to your code, so there is no array to reshape. Current releases build the payload from whole-buffer info and the camera's node map instead, which is why the upgrade removes the failure rather than hiding it.
Does the -1009 exception mean the camera or the network dropped frames?
No. The traceback shows the failure after delivery: the producer handed over a filled buffer and the crash happened while the consumer described it as an image. Loss on a GigE link produces different symptoms, such as empty components or incomplete buffers, and those have their own stability fixes.