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

[BUG] Confusing error message on aperture photometry tab when photutils is not installed #2546

Open
eteq opened this issue Nov 1, 2023 · 4 comments
Labels
bug Something isn't working imviz needs-clarification Waiting for user response

Comments

@eteq
Copy link
Contributor

eteq commented Nov 1, 2023

Jdaviz component

Imviz

Description

I created a fresh environment to test something in jdaviz, but I forgot to install photutils. Then when I tried to open up the aperture photometry plugin, I get the following rather misleading error:
nodata_screenshot

The confusing thing being the "No data available", when, as the screenshot shows, there's clearly data. If I re-do it with photutils installed it correctly shows the data sets present.

How to Reproduce

  1. Install jdaviz but not photutils
  2. Start imviz, load some image
  3. Open the aperture photometry plugin

Expected behavior

I would have expected some sort of "photutils not installed" message in the plugin.

Browser

No response

Jupyter

IPython : 8.16.0
ipykernel : 6.25.2
ipywidgets : 8.1.1
jupyter_client : 7.0.6
jupyter_core : 5.3.2
jupyter_server : 1.24.0
jupyterlab : 4.0.6
nbclient : 0.8.0
nbconvert : 7.8.0
nbformat : 5.9.2
notebook : 7.0.4
qtconsole : 5.4.3
traitlets : 5.10.1

Software versions

Python 3.11.5 (main, Sep 2 2023, 14:16:33) [GCC 13.2.1 20230801]

import numpy; print("Numpy", numpy.version)
Numpy 1.26.0
import astropy; print("astropy", astropy.version)
astropy 5.3.1
import matplotlib; print("matplotlib", matplotlib.version)
matplotlib 3.8.0
import scipy; print("scipy", scipy.version)
scipy 1.11.3
import skimage; print("scikit-image", skimage.version)
scikit-image 0.21.0
import asdf; print("asdf", asdf.version)
asdf 2.15.0
import stdatamodels; print("stdatamodels", stdatamodels.version)
stdatamodels 1.6.0
import gwcs; print("gwcs", gwcs.version)
gwcs 0.18.3
import regions; print("regions", regions.version)
regions 0.7
import specutils; print("specutils", specutils.version)
specutils 1.11.0
import specreduce; print("specreduce", specreduce.version)
specreduce 1.3.0
import photutils; print("photutils", photutils.version)
photutils 1.8.0
import astroquery; print("astroquery", astroquery.version)
astroquery 0.4.6
import yaml; print("pyyaml", yaml.version)
pyyaml 6.0.1
import asteval; print("asteval", asteval.version)
asteval 0.9.30
import idna; print("idna", idna.version)
idna 3.4
import traitlets; print("traitlets", traitlets.version)
traitlets 5.10.1
import bqplot; print("bqplot", bqplot.version)
bqplot 0.12.39
import bqplot_image_gl; print("bqplot-image-gl", bqplot_image_gl.version)
bqplot-image-gl 1.4.11
import glue; print("glue-core", glue.version)
glue-core 1.12.0
import glue_jupyter; print("glue-jupyter", glue_jupyter.version)
glue-jupyter 0.17.0
import glue_astronomy; print("glue-astronomy", glue_astronomy.version)
glue-astronomy 0.10.0
import echo; print("echo", echo.version)
echo 0.8.0
import ipyvue; print("ipyvue", ipyvue.version)
ipyvue 1.9.2
import ipyvuetify; print("ipyvuetify", ipyvuetify.version)
ipyvuetify 1.8.10
import ipysplitpanes; print("ipysplitpanes", ipysplitpanes.version)
ipysplitpanes 0.2.0
import ipygoldenlayout; print("ipygoldenlayout", ipygoldenlayout.version)
ipygoldenlayout 0.4.0
import ipypopout; print("ipypopout", ipypopout.version)
ipypopout 1.0.0
import jinja2; print("Jinja2", jinja2.version)
Jinja2 3.1.2
import voila; print("voila", voila.version)
voila 0.4.1
import vispy; print("vispy", vispy.version)
vispy 0.13.0
import sidecar; print("sidecar", sidecar.version)
sidecar 0.5.2
import jdaviz; print("Jdaviz", jdaviz.version)
Jdaviz 3.5.0

@eteq eteq added bug Something isn't working needs-triage Issue opened via template and needs triaging labels Nov 1, 2023
@pllim
Copy link
Contributor

pllim commented Nov 1, 2023

How did you even get to the point of having jdaviz without photutils? photutils is a required dependency.

"photutils>=1.4",

Not sure if there is anything we can do to help you if you managed to circumvent pip install rules.

@pllim
Copy link
Contributor

pllim commented Nov 1, 2023

Also your version manifest above says you have photutils 1.8.0

@pllim pllim added imviz needs-clarification Waiting for user response and removed needs-triage Issue opened via template and needs triaging labels Nov 1, 2023
@kecnry
Copy link
Member

kecnry commented Nov 2, 2023

Aperture requires a subset to exist. We don't set the "No data available text", but I can see how that is very misleading, perhaps we can try to override it. Or if there are no values, instead of showing the dropdown, show a warning alert in its place.

I don't think you can even import jdaviz without photutils, although we could do what we do for footprints and allow importing and just disable the plugin (with a warning in the UI).

@pllim
Copy link
Contributor

pllim commented Nov 2, 2023

I really don't think there is anything to fix here. It was likely user error. I asked Erik to close this issue if he cannot reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working imviz needs-clarification Waiting for user response
Projects
None yet
Development

No branches or pull requests

3 participants