glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
721 stars 152 forks source link

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

Open DrXav opened 2 months ago

DrXav commented 2 months ago

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:

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.

jfoster17 commented 2 months ago

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