Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

AUTO Session Initialization Fails in Python Measurement Plugin with VISA Devices

Aperta
#1,263 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@bkeryan ci sta già lavorando.

Dal 13/11/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

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:

  1. Clone and modify the visa example from NI's measurement-plugin-python repo.
  2. Use the plugin to communicate with any 3rd party instrument.
  3. 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-service version [e.g. 3.0.1]
  • InstrumentStudio version 25Q3
  • Python version [e.g. 3.10]

AB#3460500

Lingua principale
Python
Stelle
21
Fork
20
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ni/measurement-plugin-python

Tutte le issue di ni/measurement-plugin-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.