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

TypeError: setValue expects int, gets float during splash screen progress update #2485

Open
DrXav opened this issue Apr 19, 2024 · 1 comment
Labels

Comments

@DrXav
Copy link

DrXav commented Apr 19, 2024

Describe the bug
When launching GlueViz, a TypeError occurs during the splash screen progress update. The setValue function expects an integer value, but it receives a float instead. This results in the application failing to launch unless the code is manually corrected to cast the float to an integer.

Steps to reproduce the behaviour:

  • Install GlueViz in a clean conda environment.
  • Attempt to launch GlueViz.
  • The splash screen attempts to update progress.
  • The application fails with a TypeError on setValue.

Expected behaviour
The splash screen should update the progress smoothly without type errors, and GlueViz should launch without requiring manual intervention in the code.

Details:

Operating System: Windows 10
Glue: 1.2.4
Python: 3.11.8
PyQt5: PyQt: 5.15.10 - Qt: 5.15.2
PySide2: Not installed
qtpy: 2.4.1
setuptools: 68.2.2
echo: 0.5
numpy: 1.26.4
matplotlib: 3.8.4
pandas: 2.1.4
astropy: 5.3.4
dill: 0.3.7
h5py: 3.9.0
xlrd: 2.0.1
openpyxl: 3.0.10
mpl-scatter-density: 0.7
glue-core: 1.2.4
glue-vispy-viewers: 1.0.5
IPython: 8.20.0
qtconsole: 5.5.1
ipykernel: 6.28.0
traitlets: 5.7.1
pygments: 2.15.1
pyzmq: 25.1.2
scipy: 1.12.0
scikit-image: 0.22.0
PyAVM: Not installed
spectral-cube: Not installed
astrodendro: Not installed
mock: Not installed
pytest: Not installed
plotly: 5.19.0

How you installed glue: [conda update -c conda-forge glueviz]

Additional context
This issue seems to stem from the progress value being passed as a float where an integer is expected by the setValue method in splash_screen.py. A temporary fix was to edit the line in splash_screen.py to cast the value to an integer (self.progress.setValue(int(value))), which allowed the application to launch successfully.

@DrXav DrXav added the bug label Apr 19, 2024
@jfoster17
Copy link
Member

Unfortunately conda is currently installing an old version of glue. More recent versions fix this (as does your edit) -- within a conda environment you can upgrade glue to the latest version by doing:

pip install glue-core -U

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants