fresh-continent-76371
03/18/2023, 11:11 AM//:reqs#..
to the test, but that did not resolve it.
what is the best way to debug this issue (I have 15 test cases that fail for -not same- reasons, so I am after the technique suggestions.fresh-continent-76371
03/18/2023, 11:12 AMrefined-addition-53644
03/18/2023, 11:15 AM--keep-sandboxes
and -ldebug
?
https://www.pantsbuild.org/docs/troubleshootingrefined-addition-53644
03/18/2023, 11:17 AMbroad-processor-92400
03/18/2023, 11:17 AMfresh-continent-76371
03/18/2023, 11:38 AM/home/USER/.cache/pants/named_caches/pex_root/venvs/s/426ec880/venv/lib/python3.9/site-packages/pyvisa/resources/messagebased.py:644: in query
return self.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <'GPIBInstrument'('GPIB0::19::0::INSTR')>, termination = '\n'
encoding = None
def read(
self, termination: Optional[str] = None, encoding: Optional[str] = None
) -> str:
"""Read a string from the device.
Reading stops when the device stops sending (e.g. by setting
appropriate bus lines), or the termination characters sequence was
detected. Attention: Only the last character of the termination
characters is really used to stop reading, however, the whole sequence
is compared to the ending of the read string message. If they don't
match, a warning is issued.
Parameters
----------
termination : Optional[str], optional
Alternative character termination to use. If None, the value of
write_termination is used. Defaults to None.
encoding : Optional[str], optional
Alternative encoding to use to turn bytes into str. If None, the
value of encoding is used. Defaults to None.
Returns
-------
str
Message read from the instrument and decoded.
"""
enco = self._encoding if encoding is None else encoding
if termination is None:
termination = self._read_termination
message = self._read_raw().decode(enco)
else:
with self.read_termination_context(termination):
message = self._read_raw().decode(enco)
if not termination:
return message
if not message.endswith(termination):
> warnings.warn(
"read string doesn't end with " "termination characters", stacklevel=2
)
E UserWarning: read string doesn't end with termination characters
refined-addition-53644
03/18/2023, 11:46 AMfresh-continent-76371
03/18/2023, 12:08 PMrefined-addition-53644
03/18/2023, 12:14 PM@
is kinda weird.fresh-continent-76371
03/18/2023, 12:19 PMfresh-continent-76371
03/18/2023, 12:21 PMrefined-addition-53644
03/18/2023, 12:22 PMfresh-continent-76371
03/18/2023, 12:23 PM'/tmp/pants-sandbox-BKuk2N/computing_high/instruments/sim/Agilent_E8267D.yaml'
fresh-continent-76371
03/18/2023, 12:23 PMfresh-continent-76371
03/18/2023, 12:27 PMresources(
name="test_resources",
sources=["**/test/**/*.json","**/test/**/*.yaml","computing_high/instruments/sim/**/*.yaml"]
)
python_tests(
name="tests",
sources=[
'**/test_*.py', '**/*_test.py',
],
dependencies=[
":test_utils",
"//:setuptools",
":test_resources",
"//:reqs#PyVISA",
"//:reqs#PyVISA-sim",
]
)
refined-addition-53644
03/18/2023, 12:28 PMfresh-continent-76371
03/18/2023, 12:35 PMfresh-continent-76371
03/18/2023, 12:36 PMfresh-continent-76371
03/18/2023, 12:39 PMfresh-continent-76371
03/18/2023, 12:40 PM