ni / ni/measurement-plugin-python
Measurements using `get_connections` fails when sites are unset and no pin map is provided
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 21
- Forks
- 20
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 3
Description
Bug Report
- Running the Python measurements with
get_connectionswithout a pin map and with sites not configured in the pin map context results in a measurement failure, accompanied by the following exception:
Repro or Code Sample
- Create a Python Measurement Client for niscope_acquire_waveform.
- With no pin map, set
pin_map_contexttoPinMapContext(pin_map_id="", sites=[]). - Call measure() API.
Expected Behavior
Return the the output of the measurement.
Current Behavior
Measurement fails with an exception.
Possible Solution
https://github.com/ni/measurement-plugin-python/pull/915#discussion_r1771833680
Context
https://github.com/ni/measurement-plugin-python/pull/915#discussion_r1771745886
Your Environment
- OS & Device: Windows
ni-measurement-plugin-sdk-serviceversion: 2.1.0-dev0 - main- MeasurementLink version: 2024 Q3
- Python version: 3.9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Python measurement client and the examples/niscope_acquire_waveform measurement, then trace measure() and get_connections() with PinMapContext(pin_map_id="", sites=[]). Reproduce the failure without a pin map; done means measure() returns the measurement output instead of raising the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100