schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.2k stars 281 forks source link

TypeError: setMaximum(self, int) when opening Plugin Lighting Settings #264

Closed cgohlke closed 2 years ago

cgohlke commented 2 years ago

Open Plugin Lighting Settings on PyMol 2.6.0a0, PyQt5-5.15.7, Python 3.10 for Windows, raises the following exception:

Traceback (most recent call last):
  File "X:\Python310\lib\site-packages\pymol\pymol_path\data/startup\lightingsettings_gui\__init__.py", line 10, in lightingsettings
    return main.lightingsettings()
  File "X:\Python310\lib\site-packages\pymol\pymol_path\data/startup\lightingsettings_gui\main.py", line 147, in lightingsettings
    dialog = create_dialog()
  File "X:\Python310\lib\site-packages\pymol\pymol_path\data/startup\lightingsettings_gui\main.py", line 227, in create_dialog
    slider = SettingSlider(dialog,
  File "X:\Python310\lib\site-packages\pymol\pymol_path\data/startup\lightingsettings_gui\main.py", line 25, in __init__
    self.setMaximum(self.value_range / float(res))
TypeError: setMaximum(self, int): argument 1 has unexpected type 'float'
PyMOL>diagnostics
PyMOL 2.6.0a0
build date: Sat Oct  8 17:07:55 2022 +0800

License Information:
Open-Source Build

Operating System:
Windows-10-10.0.19044

OpenGL Driver:
NVIDIA Corporation
Quadro RTX 5000/PCIe/SSE2
4.6.0 NVIDIA 517.40
PyQt5 5.15.7 (Qt 5.15.2)

Python:
3.10.7 (tags/v3.10.7:6cc6b13, Sep  5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
prefix=X:\Python310
executable=X:\Python310\PyMOL.exe
filesystemencoding=utf-8

Startup Scripts:
(no pymolrc file found)

Qt, Python and PyMOL Environment Variables:
PYMOL_DATA=X:\Python310\lib\site-packages\pymol\pymol_path\data
PYMOL_PATH=X:\Python310\lib\site-packages\pymol\pymol_path
PY_PYTHON=3.10
QT_API=pyqt5
QT_API_=pyqt5
JarrettSJohnson commented 2 years ago

Thanks Christoph. Fix is in for open-source. Fixes in conda will come a bit down the road when 2.5.5 comes out in a couple of weeks.

cgohlke commented 2 years ago

Thanks. The fix works.