Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about invalid entries only once per session (or add flag to suppress these messages) #298

Open
klauer opened this issue Feb 10, 2023 · 0 comments

Comments

@klauer
Copy link
Contributor

klauer commented Feb 10, 2023

This warning can be really bad when using happi interactively:

happi/happi/client.py

Lines 527 to 530 in 7190c4f

logger.warning(
"Entry for %s is malformed (%s). Skipping.",
doc["name"], exc
)

Example:

In [4]: for res in client.search_regex(name="cxi.*", lightpath="False"):
   ...:     print(res.metadata["name"], type(res.metadata["lightpath"]), repr(res.metadata["lightpath"]))
   ...:
Entry for cxi_leviton_r51_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r51_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r51_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r52_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r52_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r52_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r53_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r53_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r53_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r54_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r54_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r54_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r56_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r56_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r56_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r57_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r57_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r57_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r58_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r58_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r58_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r59_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r59_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r59_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
cxi_dsb_attenuator <class 'bool'> False
cxi_kb2_hl <class 'bool'> False
cxi_kb2_hp <class 'bool'> False
cxi_kb2_hr <class 'bool'> False
cxi_kb2_hx <class 'bool'> False
cxi_kb2_hy <class 'bool'> False
cxi_kb2_vp <class 'bool'> False
cxi_kb2_vx <class 'bool'> False
cxi_kb2_vy <class 'bool'> False
cxi_pi1 <class 'bool'> False
cxi_pi2 <class 'bool'> False
cxi_pi3 <class 'bool'> False
cxi_pulsepicker <class 'bool'> False
cxi_txt <class 'bool'> False
cxi_xrt_attenuator <class 'bool'> False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant