sandialabs / pyscan

Scientific Measurement Toolbox
https://pyscan.readthedocs.io/en/latest/
MIT License
4 stars 4 forks source link

fix json encoder bug for GPIBInstrument objects #220

Closed mplilly4395 closed 2 months ago

mplilly4395 commented 2 months ago

Update to the JSON encoder to deal with GPIBInstrument objects. There is no testing for this error yet.

rsbrost commented 2 months ago

That said, the imports are failing test cases since for whatever reason the new pyvisa package pieces (such as Firewire, etc.) are not successfully imported by the github runner. I think we will need to add these explicitly to the pyscan setup.py for them to be recognized... might want to check with Andy on this.

mplilly4395 commented 2 months ago

Take a look again. I am importing from pyvisa.resources now rather than pyvisa.resources.gpib (which only has GPIBInstrument).

From: rsbrost @.> Date: Monday, August 26, 2024 at 10:40 AM To: sandialabs/pyscan @.> Cc: Lilly, Mike @.>, Author @.> Subject: [EXTERNAL] Re: [sandialabs/pyscan] fix json encoder bug for GPIBInstrument objects (PR #220)

That said, the imports are failing test cases since for whatever reason the new pyvisa package pieces (such as Firewire, etc.) are not successfully imported by the github runner. I think we will need to add these explicitly to the pyscan setup.py for them to be recognized... might want to check with Andy on this.

— Reply to this email directly, view it on GitHubhttps://github.com/sandialabs/pyscan/pull/220#issuecomment-2310621837, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7HRKOBXFNVIPM57QOMIT2DZTNK6XAVCNFSM6AAAAABM4SNQ36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJQGYZDCOBTG4. You are receiving this because you authored the thread.Message ID: @.***>

rsbrost commented 2 months ago

Tested on lab experiment including srs830 as a device. I replicated the JSON encoder error, then pulled this branches changes and validated that they fix the issue. Merging now.