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

Problem setting presets in PropertyWidget #245

Open
wl-stepp opened this issue Nov 17, 2023 · 1 comment
Open

Problem setting presets in PropertyWidget #245

wl-stepp opened this issue Nov 17, 2023 · 1 comment

Comments

@wl-stepp
Copy link
Contributor

wl-stepp commented Nov 17, 2023

  • pymmcore-widgets version: 0.1.dev190+g3f1e2ea
  • Python version: 3.11.4
  • Operating System: Windows 10

Description

Trying to modify a Preset in the GroupPresetTableWidget. A value that comes out of our Prime BSI (I think) seems to overflow for setting a slider.

What I Did

WARNING: Traceback (most recent call last):
  File "C:\iSIM\pymmcore-widgets\src\pymmcore_widgets\_group_preset_widget\_group_preset_table_widget.py", line 331, in _edit_group
    self._edit_group_wdg = EditGroupWidget(group, parent=self)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\iSIM\pymmcore-widgets\src\pymmcore_widgets\_group_preset_widget\_edit_group_widget.py", line 35, in __init__
    self._create_gui()
  File "C:\iSIM\pymmcore-widgets\src\pymmcore_widgets\_group_preset_widget\_edit_group_widget.py", line 53, in _create_gui
    table = self._create_table_wdg()
            ^^^^^^^^^^^^^^^^^^^^^^^^
    self._prop_table = DevicePropertyTable(enable_property_widgets=False)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\iSIM\pymmcore-widgets\src\pymmcore_widgets\_device_property_table.py", line 98, in __init__
    self._rebuild_table()
  File "C:\iSIM\pymmcore-widgets\src\pymmcore_widgets\_device_property_table.py", line 149, in _rebuild_table
    wdg = PropertyWidget(
          ^^^^^^^^^^^^^^^
  File "C:\iSIM\pymmcore-widgets\src\pymmcore_widgets\_property_widget.py", line 325, in __init__
    self._value_widget = _creat_prop_widget(self._mmc, device_label, prop_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\iSIM\pymmcore-widgets\src\pymmcore_widgets\_property_widget.py", line 254, in _creat_prop_widget
    wdg.setMaximum(wdg.type_cast(mmcore.getPropertyUpperLimit(dev, prop)))
  File "C:\iSIM\iSIM\gui\.venv\Lib\site-packages\superqt\sliders\_labeled.py", line 68, in setMaximum
    self._slider.setMaximum(maximum)
OverflowError: argument 1 overflowed: value must be in the range -2147483648 to 2147483647
@tlambert03
Copy link
Member

Yeah, that's a known issue, see #223

We do try to at least catch the errors though since #224. But perhaps we need an additional try somewhere

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

No branches or pull requests

2 participants