Details
-
Type:
Story
-
Status: In Review
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: afw
-
Labels:None
-
Story Points:1
-
Epic Link:
-
Team:Alert Production
-
Urgent?:No
Description
On GitHub afw #516, Brigitta Sipocz writes:
Consider the following code and the scenario of the 'matplotlib' backend and a broken install where lsst.display is not available.
https://github.com/lsst/afw/blob/master/python/lsst/afw/display/interface.py#L85-L106It raises the somewhat cryptic error message:
RuntimeError: Unable to set backend to matplotlib: "module 'matplotlib' has no attribute 'DisplayImpl'"
While the real underlying issue is that lsst.display is not available, matplotlib should never be expected to have a DisplayImpl attribute.
My naive approach of shuffling the order of elements in the tuple probably makes no sense, adding another try/except might be enough to raise a more relevant error.
Let me know if you would like a quick PR. (The install has since been fixed, so I won't have a good way to test it).
Robert Lupton, could you take a quick look at https://github.com/lsst/afw/pull/517 please?
I think the bulk of the changes (on 60bae5c) are straightforward enough.
However, I'd really appreciate a sanity check on 8a7392a. This is removing a display argument from a docstring which you added a couple of years ago, but which it seems to me can't have been right then (and certainly isn't now)... but I'm not sure what you were aiming for! Can you help?