Skip to content

[BUG] Issue in recently released wxpython 4.3.X prevents visgui from loading in latest PYME pip and github builds #1694

Description

@csoeller

Describe the bug
Latest PYME pip installs will install wxpython-4.3.X as a dependency (currently 4.3.1), which then triggers with visgui what is likely a bug in latest wxpython related to the ColourPickerCtrl class.

Quickest intererim solution is probably to pin wxpython<4.3 until this is solved upstream to avoid install fails for PYME (which then likely get blamed on PYME by most users). This is an issue for current PYME pip installs and is also still the case with latest PYME from github.

So far it seems unlikely to be a result of a wxPython deprecation, @barentine's #1690 already fixes a deprecation that otherwise stopped dh5view from working.

To Reproduce
Steps to reproduce the behavior:

  1. Install latest PYME from pip.
  2. Start visGUI app.
  3. See error

Expected behavior
No error.

Error message

Traceback (most recent call last):
  File "/XXX/PYME-test-env/build-test-py3.12-conda_wxp/python-microscopy-master/PYME/LMVis/VisGUI.py", line 438, in OnInit
    self.main = VisGUIFrame(None, self.filename, use_shaders=self.use_shaders, cmd_args=self.cmd_args)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/PYME-test-env/build-test-py3.12-conda_wxp/python-microscopy-master/PYME/LMVis/VisGUI.py", line 93, in __init__
    visCore.VisGUICore.__init__(self, use_shaders=use_shaders)
  File "/XXX/PYME-test-env/build-test-py3.12-conda_wxp/python-microscopy-master/PYME/LMVis/visCore.py", line 122, in __init__
    sizer.Add(self.create_tool_bar(gl_pan), 0, wx.EXPAND, 0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/PYME-test-env/build-test-py3.12-conda_wxp/python-microscopy-master/PYME/LMVis/visCore.py", line 348, in create_tool_bar
    return DisplayPaneHorizontal(parent, self.glCanvas, self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/PYME-test-env/build-test-py3.12-conda_wxp/python-microscopy-master/PYME/LMVis/displayPane.py", line 423, in __init__
    self.sb_color_ctrl = wx.ColourPickerCtrl(self, colour=wx.WHITE, size=(40, -1))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/miniconda3/envs/test-pyme-3.12-conda_wxp/lib/python3.12/site-packages/wx/core.py", line 3202, in __init__
    self.SetPickerCtrl(widget)
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'ColourPickerCtrl' object has no attribute 'SetPickerCtrl'. Did you mean: 'GetPickerCtrl'?
OnInit returned false, exiting...

Platform (please complete the following information - or copy-paste from error dialog if shown):

  • OS: checked so far on mac, maybe platform independent issue
  • Python version: 3.11, 3.12, 3.13
  • wxpython version [if a UI bug]: 4.3.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions