From 5a02857cd6a4a8604c4a672dbde8470bc18197d5 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Thu, 25 Jun 2020 16:42:19 +0100 Subject: [PATCH] Unable to import wx TableEditor on Windows - raise to debug --- etstool.py | 1 + traitsui/editor_factory.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/etstool.py b/etstool.py index 476479e88..a6458b777 100644 --- a/etstool.py +++ b/etstool.py @@ -213,6 +213,7 @@ def test(runtime, toolkit, environment): parameters = get_parameters(runtime, toolkit, environment) environ = environment_vars.get(toolkit, {}).copy() environ['PYTHONUNBUFFERED'] = "1" + environ['TRAITS_DEBUG'] = "1" if toolkit == "wx": environ["EXCLUDE_TESTS"] = "qt" diff --git a/traitsui/editor_factory.py b/traitsui/editor_factory.py index 682a2091d..7f98c34b3 100644 --- a/traitsui/editor_factory.py +++ b/traitsui/editor_factory.py @@ -226,6 +226,8 @@ def _get_simple_editor_class(self): try: SimpleEditor = self._get_toolkit_editor("SimpleEditor") except Exception as e: + from traitsui.api import raise_to_debug + raise_to_debug() msg = "Can't import SimpleEditor for {}: {}" logger.debug(msg.format(self.__class__, e)) SimpleEditor = toolkit_object("editor_factory:SimpleEditor")