ni / ni/measurement-plugin-python

Measurements using `get_connections` fails when sites are unset and no pin map is provided

Open
#927 0 comments 0 reactions 0 assignees View on GitHub

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_connections without a pin map and with sites not configured in the pin map context results in a measurement failure, accompanied by the following exception:
    image

Repro or Code Sample

  • Create a Python Measurement Client for niscope_acquire_waveform.
  • With no pin map, set pin_map_context to PinMapContext(pin_map_id="", sites=[]).
  • Call measure() API.

Expected Behavior

Return the the output of the measurement.

Current Behavior

Measurement fails with an exception.
image

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-service version: 2.1.0-dev0 - main
  • MeasurementLink version: 2024 Q3
  • Python version: 3.9

AB#2865897

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.