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
There are components in the AreaDetector module that are not lazy. When we create the namespaces and call getattr on these they attempt to connect. This causes issues including a large start-up time while we wait for connections.
Current Behavior
2018-04-09 10:51:48 - PID 4477 utils.py: 47 safe_load INFO Loading default groups...
2018-04-09 10:51:48 - PID 4477 namespace.py: 36 class_namespace DEBUG Create class_namespace cls=EpicsMotor, scope=hutch_python.db
2018-04-09 10:52:03 - PID 4477 utils.py: 52 safe_load ERROR Failed to load default groups
2018-04-09 10:52:03 - PID 4477 utils.py: 53 safe_load DEBUG Failed to connect to MFX:DG2:P6740:IMAGE2:BayerPattern_RBV
Traceback (most recent call last):
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/hutch_python/utils.py", line 49, in safe_load
yield
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/hutch_python/load_conf.py", line 258, in load_conf
default_class_namespace('EpicsMotor', 'motors', cache)
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/hutch_python/load_conf.py", line 316, in default_class_namespace
objs = class_namespace(cls, scope='hutch_python.db')
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/hutch_python/namespace.py", line 65, in class_namespace
accumulate(obj, scope_objs, cache)
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/hutch_python/namespace.py", line 58, in accumulate
accumulate(sub_obj, scope_objs, cache)
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/hutch_python/namespace.py", line 58, in accumulate
accumulate(sub_obj, scope_objs, cache)
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/hutch_python/namespace.py", line 57, in accumulate
sub_obj = getattr(obj, comp_name)
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/ophyd/device.py", line 176, in __get__
instance._signals[self.attr] = self.create_component(instance)
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/ophyd/device.py", line 134, in create_component
cpt_inst.wait_for_connection()
File "/reg/g/pcds/pyps/conda/py36/envs/pcds-1.0.0/lib/python3.6/site-packages/ophyd/signal.py", line 474, in wait_for_connection
self._read_pv.pvname)
TimeoutError: Failed to connect to MFX:DG2:P6740:IMAGE2:BayerPattern_RBV
Possible Solution
We should skip all non-lazy components while creating namespaces.
The text was updated successfully, but these errors were encountered:
Should we unilaterally reject all lazy devices, even those that match the class? I think it's possible to do this in a way where we minimize the getattrs but still catch the things we want.
I am kind of convinced that should avoid using any non-lazy components in our devices which we means this edge case will only exist when dealing with things like AreaDetector. If this is going to be the case I think it is fine to drop everything. Not too concerned about making groups for peoples AreaDetector plugins. If they want it they can do it explicitly.
Expected Behavior
There are components in the
AreaDetector
module that are not lazy. When we create the namespaces and callgetattr
on these they attempt to connect. This causes issues including a large start-up time while we wait for connections.Current Behavior
Possible Solution
We should skip all non-lazy components while creating namespaces.
The text was updated successfully, but these errors were encountered: