You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accessing the foo property raises the following error, which has no traceback or reference whatsoever to what actually causes the error, which is the missing bar attribute:
In [3]: foo=Foo('foo')
In [4]: foo.fooTraceback (mostrecentcalllast):
CellIn[4], line1foo.fooFile~\Documents\Qcodes\src\qcodes\utils\attribute_helpers.py:69in__getattr__raiseAttributeError(
AttributeError: 'Foo'objectanditsdelegateshavenoattribute'foo'
This behavior makes these sorts of errors extremely cumbersome to debug if you're not aware of it. Instead, there should be a traceback to an AttributeError when getting self.bar in this example.
Acccessing a faulty property of an instrument raises obscure error.
If an instrument has a
property
which raises an exception when gotten, the resulting error trace obscures the source of the error.Steps to reproduce
Take the following subclass of an instrument:
Accessing the
foo
property raises the following error, which has no traceback or reference whatsoever to what actually causes the error, which is the missingbar
attribute:This behavior makes these sorts of errors extremely cumbersome to debug if you're not aware of it. Instead, there should be a traceback to an
AttributeError
when gettingself.bar
in this example.Branch: main @ 42c7483
The text was updated successfully, but these errors were encountered: