pyvisa: ValueError after a few hours of communication with a device
I am using pyvisa and the @py backend to control a vector signal generator. Everything runs fine for a while but sometimes the following error gets raised. Any pointers would be highly appreciated.
File "visa_client.py", line 20, in command
self.resource.write(command)
File "...\Python37-32\lib\site-packages\pyvisa\resources\messagebased.py", line 223, in write
count = self.write_raw(message.encode(enco))
File "...\Python37-32\lib\site-packages\pyvisa\resources\messagebased.py", line 201, in write_raw
return self.visalib.write(self.session, message)
File "...\Python37-32\lib\site-packages\pyvisa-py\highlevel.py", line 368, in write
ret = self.sessions[session].write(data)
File "...\Python37-32\lib\site-packages\pyvisa-py\tcpip.py", line 182, in write
flags, block)
ValueError: too many values to unpack (expected 2)
Error closing VISA link: wrong xid in reply 14206 instead of 14207
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 18 (11 by maintainers)
This issue is still present in 1.11.4.dev1+g6881af7
It is easily provoked by creating a bad query
Does anybody found the solution to the above problem? I am controlling an instrument via pyvisa and facing this value error randomly anytime. I tried to handle the exception but it still crashes my program.