AUTO Session Initialization Fails in Python Measurement Plugin with VISA Devices
@bkeryan ci sta già lavorando.
Dal 13/11/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Bug Report
The AUTO session initialization behavior in the Python measurement plugin does not work as expected when communicating with VISA instruments. Instead of automatically initializing or attaching based on the environment (InstrumentStudio or TestStand), it fails with a VI_ERROR_RSRC_NFOUND error.
Related Link: InstrumentStudio Pro Python plugin for third party hardware using VISA
Repro or Code Sample
Steps to reproduce:
- Clone and modify the visa example from NI's measurement-plugin-python repo.
- Use the plugin to communicate with any 3rd party instrument.
- Run the plugin with SessionInitializationBehavior.AUTO.
Expected Behavior
The plugin should automatically initialize the session when run from InstrumentStudio and attach when run from TestStand, as per the behavior defined by AUTO.
Current Behavior
The plugin fails with the following error:
VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
Changing init_behavior from AUTO (0) to INITIALIZE_SERVER_SESSION (1) resolves the issue.
Possible Solution
Investigate why AUTO does not behave correctly in Python plugins. A workaround is to manually set the initialization behavior based on the calling environment (e.g., InstrumentStudio vs TestStand), but this should not be necessary.
Context
This issue affects plugin developers trying to use the Python SDK to communicate with VISA instruments. It introduces unnecessary complexity and diverges from expected behavior
Your Environment
- OS & Device: Windows
ni-measurement-plugin-sdk-serviceversion [e.g. 3.0.1]- InstrumentStudio version 25Q3
- Python version [e.g. 3.10]
- Lingua principale
- Python
- Stelle
- 21
- Fork
- 20
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ni/measurement-plugin-python
-
Clean up the unused `build_in_import_modules` dictionary in ni-measurement-plugin-client-generatorApertatech debt
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
ni/measurement-plugin-python#979 ·
-
tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
ni/measurement-plugin-python#926 ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
ni/measurement-plugin-python#1227 ·
-
tech debt
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
ni/measurement-plugin-python#978 ·
-
tech debt
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
ni/measurement-plugin-python#959 ·
Tutte le issue di ni/measurement-plugin-python
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
lugassawan/swe-workbench#799 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: CPU without Triton: slot-mapping fallback has a stale signature after #57169, V1 inference fails on the first forward stepForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
vllm-project/vllm#61131 ·
I maintainer di solito rispondono entro 1 giorno
-
Non-string form field names raise AttributeError when files are attachedForse già presa @nightcityblade l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kubernetes-client/python#2735 ·
I maintainer di solito rispondono entro 1 giorno
-
desktop help wanted test
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno