Problem Description
Module not found error when running some modules in enable such as enable/enable/examples/demo/enable/brush_draw, this is likely due to the change of qt folders in traitsui
/Users/cyliu/Documents/3.11_retest/enable/enable/trait_defs/ui/qt4/rgba_color_editor.py:32: FutureWarning: The traitsui.qt4.* modules have moved to traitsui.qt.*.
Applications which require backwards compatibility can either:
- set the ETS_QT4_IMPORTS environment variable
- set the ETS_TOOLKIT environment variable to "qt4",
- the ETSConfig.toolkit to "qt4"
- install a ShadowedModuleFinder into sys.meta_path::
import sys
from pyface.ui import ShadowedModuleFinder
sys.meta_path.append(ShadowedModuleFinder(
package="traitsui.qt4.",
true_package="traitsui.qt.",
))
from traitsui.qt4.color_editor import (
Traceback (most recent call last):
File "/Users/cyliu/Documents/3.11_retest/enable/enable/examples/demo/enable/brush_draw.py", line 15, in <module>
from enable.examples._example_support import DemoFrame, demo_main
File "/Users/cyliu/Documents/3.11_retest/enable/enable/examples/_example_support.py", line 18, in <module>
from enable.api import Component, ComponentEditor
File "/Users/cyliu/Documents/3.11_retest/enable/enable/api.py", line 184, in <module>
from .base import (
File "/Users/cyliu/Documents/3.11_retest/enable/enable/base.py", line 41, in <module>
from .colors import color_table, transparent_color
File "/Users/cyliu/Documents/3.11_retest/enable/enable/colors.py", line 20, in <module>
from enable.trait_defs.ui.rgba_color_editor import (
File "/Users/cyliu/Documents/3.11_retest/enable/enable/trait_defs/ui/rgba_color_editor.py", line 15, in <module>
from .qt4.rgba_color_editor import RGBAColorEditor
File "/Users/cyliu/Documents/3.11_retest/enable/enable/trait_defs/ui/qt4/rgba_color_editor.py", line 32, in <module>
from traitsui.qt4.color_editor import (
ModuleNotFoundError: No module named 'traitsui.qt4.color_editor'
Expected behavior:
Demo run successfully without error
Problem Description Module not found error when running some modules in enable such as enable/enable/examples/demo/enable/brush_draw, this is likely due to the change of qt folders in traitsui
Reproduction Steps:
Expected behavior: Demo run successfully without error
OS, Python version: [MacOS, python 3.11]