EPD - Chaco/Enaml error on Windows

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

EPD - Chaco/Enaml error on Windows

Jaidev Deshpande
Hi,

I've installed EPD  on Windows XP, and I also installed PyQt4 using the binary.

When I try the following:

from chaco.api import Plot

I get the following (ridiculously long) traceback:

----------------------------------------------------------------------------------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)
D:\Documents and
Settings\Administrator\Desktop\<ipython-input-1-243b7ec540b2> in
<module>()
----> 1 from chaco.api import Plot

D:\Python27\lib\site-packages\chaco\api.py in <module>()
     35
     36 # Visual components

---> 37 from abstract_plot_renderer import AbstractPlotRenderer
     38 from abstract_overlay import AbstractOverlay
     39 from base_plot_container import BasePlotContainer

D:\Python27\lib\site-packages\chaco\abstract_plot_renderer.py in <module>()
      5
      6 # Local relative imports

----> 7 from plot_component import PlotComponent
      8
      9 class AbstractPlotRenderer(PlotComponent):

D:\Python27\lib\site-packages\chaco\plot_component.py in <module>()
      2 """
      3 # Enthought library imports

----> 4 from enable.api import Component
      5 from enable.kiva_graphics_context import GraphicsContext
      6 from traits.api import Bool, Instance, Str

D:\Python27\lib\site-packages\enable\api.py in <module>()
     10     empty_rectangle, intersect_bounds
     11
---> 12 from enable_traits import basic_sequence_types,
sequence_types, pointer_shapes, \
     13      CURSOR_X, CURSOR_Y, cursor_styles, border_size_editor,
font_trait, \
     14      bounds_trait, ComponentMinSize, ComponentMaxSize,
Pointer, cursor_style_trait, \

D:\Python27\lib\site-packages\enable\enable_traits.py in <module>()
     11 from traits.api import Trait, Range, TraitPrefixList, TraitPrefixMap, \
     12     List, TraitFactory
---> 13 from traitsui.api import ImageEnumEditor, EnumEditor
     14 # Try to get the CList trait; for traits 2 backwards
compatibility, fall back

     15 # to a normal List trait if we can't import it


D:\Python27\lib\site-packages\traitsui\api.py in <module>()
     33 from .editor_factory import EditorFactory
     34
---> 35 from .editors.api import (ArrayEditor, BooleanEditor, ButtonEditor,
     36     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
CustomEditor,
     37     CSVListEditor,

D:\Python27\lib\site-packages\traitsui\editors\__init__.py in <module>()
     20 from __future__ import absolute_import
     21
---> 22 from .api import (toolkit, ArrayEditor, BooleanEditor, ButtonEditor,
     23     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
CustomEditor,
     24     DateEditor, DefaultOverride, DirectoryEditor, DNDEditor, DropEditor,

D:\Python27\lib\site-packages\traitsui\editors\api.py in <module>()
      8 from .button_editor import ButtonEditor
      9 from .check_list_editor import CheckListEditor
---> 10 from .code_editor import CodeEditor
     11 from .color_editor import ColorEditor
     12 from .compound_editor import CompoundEditor

D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in <module>()
     34 #-------------------------------------------------------------------------------

     35
---> 36 class ToolkitEditorFactory ( EditorFactory ):
     37     """ Editor factory for code editors.
     38     """

D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
ToolkitEditorFactory()
     46
     47     # Background color for marking lines

---> 48     mark_color = Color( 0xECE9D8 )
     49
     50     # Object trait containing the currently selected line (optional)


D:\Python27\lib\site-packages\traits\traits.pyc in __call__(self,
*args, **metadata)
    485
    486     def __call__ ( self, *args, **metadata ):
--> 487         return self.maker_function( *args, **metadata )
    488
    489 class TraitImportError ( TraitFactory ):

D:\Python27\lib\site-packages\traits\traits.pyc in Color(*args, **metadata)
   1181     from traitsui.toolkit_traits import ColorTrait
   1182
-> 1183     return ColorTrait( *args, **metadata )
   1184
   1185 Color = TraitFactory( Color )

D:\Python27\lib\site-packages\traitsui\toolkit_traits.pyc in
ColorTrait(*args, **traits)
      5
      6 def ColorTrait ( *args, **traits ):
----> 7     return toolkit().color_trait( *args, **traits )
      8
      9 def RGBColorTrait ( *args, **traits ):

D:\Python27\lib\site-packages\traitsui\toolkit.pyc in toolkit(*toolkits)
    107     if ETSConfig.toolkit:
    108         # If a toolkit has already been set for ETSConfig, then use it:

--> 109         _toolkit = _import_toolkit(ETSConfig.toolkit)
    110         return _toolkit
    111     else:

D:\Python27\lib\site-packages\traitsui\toolkit.pyc in _import_toolkit(name)
     49
     50 def _import_toolkit ( name ):
---> 51     return __import__( name, globals=globals(), level=1 ).toolkit
     52
     53

ImportError: No module named qt
------------------------------------------------------------------------------------------------------------------------------------

Same happens when I try enaml-running scripts, or calling enaml views
from Python files.

I've tried setting ETS_TOOLKIT to both 'qt4' and 'wx', neither work.

It was all fine until recently when I was using PythonXY. Then I
installed EPD and that worked fine too for a while. Funny as it
sounds, this looks like it started happening all of a sudden.

What could have gone wrong?

Thanks
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPD - Chaco/Enaml error on Windows

Chris Colbert
Looks like traits is trying to import it's qt backend module, but it doesn't exist.

On Thu, Aug 9, 2012 at 10:53 AM, Jaidev Deshpande <[hidden email]> wrote:
Hi,

I've installed EPD  on Windows XP, and I also installed PyQt4 using the binary.

When I try the following:

from chaco.api import Plot

I get the following (ridiculously long) traceback:

----------------------------------------------------------------------------------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)
D:\Documents and
Settings\Administrator\Desktop\<ipython-input-1-243b7ec540b2> in
<module>()
----> 1 from chaco.api import Plot

D:\Python27\lib\site-packages\chaco\api.py in <module>()
     35
     36 # Visual components

---> 37 from abstract_plot_renderer import AbstractPlotRenderer
     38 from abstract_overlay import AbstractOverlay
     39 from base_plot_container import BasePlotContainer

D:\Python27\lib\site-packages\chaco\abstract_plot_renderer.py in <module>()
      5
      6 # Local relative imports

----> 7 from plot_component import PlotComponent
      8
      9 class AbstractPlotRenderer(PlotComponent):

D:\Python27\lib\site-packages\chaco\plot_component.py in <module>()
      2 """
      3 # Enthought library imports

----> 4 from enable.api import Component
      5 from enable.kiva_graphics_context import GraphicsContext
      6 from traits.api import Bool, Instance, Str

D:\Python27\lib\site-packages\enable\api.py in <module>()
     10     empty_rectangle, intersect_bounds
     11
---> 12 from enable_traits import basic_sequence_types,
sequence_types, pointer_shapes, \
     13      CURSOR_X, CURSOR_Y, cursor_styles, border_size_editor,
font_trait, \
     14      bounds_trait, ComponentMinSize, ComponentMaxSize,
Pointer, cursor_style_trait, \

D:\Python27\lib\site-packages\enable\enable_traits.py in <module>()
     11 from traits.api import Trait, Range, TraitPrefixList, TraitPrefixMap, \
     12     List, TraitFactory
---> 13 from traitsui.api import ImageEnumEditor, EnumEditor
     14 # Try to get the CList trait; for traits 2 backwards
compatibility, fall back

     15 # to a normal List trait if we can't import it


D:\Python27\lib\site-packages\traitsui\api.py in <module>()
     33 from .editor_factory import EditorFactory
     34
---> 35 from .editors.api import (ArrayEditor, BooleanEditor, ButtonEditor,
     36     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
CustomEditor,
     37     CSVListEditor,

D:\Python27\lib\site-packages\traitsui\editors\__init__.py in <module>()
     20 from __future__ import absolute_import
     21
---> 22 from .api import (toolkit, ArrayEditor, BooleanEditor, ButtonEditor,
     23     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
CustomEditor,
     24     DateEditor, DefaultOverride, DirectoryEditor, DNDEditor, DropEditor,

D:\Python27\lib\site-packages\traitsui\editors\api.py in <module>()
      8 from .button_editor import ButtonEditor
      9 from .check_list_editor import CheckListEditor
---> 10 from .code_editor import CodeEditor
     11 from .color_editor import ColorEditor
     12 from .compound_editor import CompoundEditor

D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in <module>()
     34 #-------------------------------------------------------------------------------

     35
---> 36 class ToolkitEditorFactory ( EditorFactory ):
     37     """ Editor factory for code editors.
     38     """

D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
ToolkitEditorFactory()
     46
     47     # Background color for marking lines

---> 48     mark_color = Color( 0xECE9D8 )
     49
     50     # Object trait containing the currently selected line (optional)


D:\Python27\lib\site-packages\traits\traits.pyc in __call__(self,
*args, **metadata)
    485
    486     def __call__ ( self, *args, **metadata ):
--> 487         return self.maker_function( *args, **metadata )
    488
    489 class TraitImportError ( TraitFactory ):

D:\Python27\lib\site-packages\traits\traits.pyc in Color(*args, **metadata)
   1181     from traitsui.toolkit_traits import ColorTrait
   1182
-> 1183     return ColorTrait( *args, **metadata )
   1184
   1185 Color = TraitFactory( Color )

D:\Python27\lib\site-packages\traitsui\toolkit_traits.pyc in
ColorTrait(*args, **traits)
      5
      6 def ColorTrait ( *args, **traits ):
----> 7     return toolkit().color_trait( *args, **traits )
      8
      9 def RGBColorTrait ( *args, **traits ):

D:\Python27\lib\site-packages\traitsui\toolkit.pyc in toolkit(*toolkits)
    107     if ETSConfig.toolkit:
    108         # If a toolkit has already been set for ETSConfig, then use it:

--> 109         _toolkit = _import_toolkit(ETSConfig.toolkit)
    110         return _toolkit
    111     else:

D:\Python27\lib\site-packages\traitsui\toolkit.pyc in _import_toolkit(name)
     49
     50 def _import_toolkit ( name ):
---> 51     return __import__( name, globals=globals(), level=1 ).toolkit
     52
     53

ImportError: No module named qt
------------------------------------------------------------------------------------------------------------------------------------

Same happens when I try enaml-running scripts, or calling enaml views
from Python files.

I've tried setting ETS_TOOLKIT to both 'qt4' and 'wx', neither work.

It was all fine until recently when I was using PythonXY. Then I
installed EPD and that worked fine too for a while. Funny as it
sounds, this looks like it started happening all of a sudden.

What could have gone wrong?

Thanks
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPD - Chaco/Enaml error on Windows

Robert Kern
On Thu, Aug 9, 2012 at 5:31 PM, Chris Colbert <[hidden email]> wrote:
> Looks like traits is trying to import it's qt backend module, but it doesn't
> exist.

That's because it's called "qt4" not "qt". It's not clear where the
"qt" is coming from.

> On Thu, Aug 9, 2012 at 10:53 AM, Jaidev Deshpande
> <[hidden email]> wrote:
>>
>> Hi,
>>
>> I've installed EPD  on Windows XP, and I also installed PyQt4 using the
>> binary.
>>
>> When I try the following:
>>
>> from chaco.api import Plot
>>
>> I get the following (ridiculously long) traceback:
>>
>>
>> ----------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> ImportError                               Traceback (most recent call
>> last)
>> D:\Documents and
>> Settings\Administrator\Desktop\<ipython-input-1-243b7ec540b2> in
>> <module>()
>> ----> 1 from chaco.api import Plot
>>
>> D:\Python27\lib\site-packages\chaco\api.py in <module>()
>>      35
>>      36 # Visual components
>>
>> ---> 37 from abstract_plot_renderer import AbstractPlotRenderer
>>      38 from abstract_overlay import AbstractOverlay
>>      39 from base_plot_container import BasePlotContainer
>>
>> D:\Python27\lib\site-packages\chaco\abstract_plot_renderer.py in
>> <module>()
>>       5
>>       6 # Local relative imports
>>
>> ----> 7 from plot_component import PlotComponent
>>       8
>>       9 class AbstractPlotRenderer(PlotComponent):
>>
>> D:\Python27\lib\site-packages\chaco\plot_component.py in <module>()
>>       2 """
>>       3 # Enthought library imports
>>
>> ----> 4 from enable.api import Component
>>       5 from enable.kiva_graphics_context import GraphicsContext
>>       6 from traits.api import Bool, Instance, Str
>>
>> D:\Python27\lib\site-packages\enable\api.py in <module>()
>>      10     empty_rectangle, intersect_bounds
>>      11
>> ---> 12 from enable_traits import basic_sequence_types,
>> sequence_types, pointer_shapes, \
>>      13      CURSOR_X, CURSOR_Y, cursor_styles, border_size_editor,
>> font_trait, \
>>      14      bounds_trait, ComponentMinSize, ComponentMaxSize,
>> Pointer, cursor_style_trait, \
>>
>> D:\Python27\lib\site-packages\enable\enable_traits.py in <module>()
>>      11 from traits.api import Trait, Range, TraitPrefixList,
>> TraitPrefixMap, \
>>      12     List, TraitFactory
>> ---> 13 from traitsui.api import ImageEnumEditor, EnumEditor
>>      14 # Try to get the CList trait; for traits 2 backwards
>> compatibility, fall back
>>
>>      15 # to a normal List trait if we can't import it
>>
>>
>> D:\Python27\lib\site-packages\traitsui\api.py in <module>()
>>      33 from .editor_factory import EditorFactory
>>      34
>> ---> 35 from .editors.api import (ArrayEditor, BooleanEditor,
>> ButtonEditor,
>>      36     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>> CustomEditor,
>>      37     CSVListEditor,
>>
>> D:\Python27\lib\site-packages\traitsui\editors\__init__.py in <module>()
>>      20 from __future__ import absolute_import
>>      21
>> ---> 22 from .api import (toolkit, ArrayEditor, BooleanEditor,
>> ButtonEditor,
>>      23     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>> CustomEditor,
>>      24     DateEditor, DefaultOverride, DirectoryEditor, DNDEditor,
>> DropEditor,
>>
>> D:\Python27\lib\site-packages\traitsui\editors\api.py in <module>()
>>       8 from .button_editor import ButtonEditor
>>       9 from .check_list_editor import CheckListEditor
>> ---> 10 from .code_editor import CodeEditor
>>      11 from .color_editor import ColorEditor
>>      12 from .compound_editor import CompoundEditor
>>
>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>> <module>()
>>      34
>> #-------------------------------------------------------------------------------
>>
>>      35
>> ---> 36 class ToolkitEditorFactory ( EditorFactory ):
>>      37     """ Editor factory for code editors.
>>      38     """
>>
>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>> ToolkitEditorFactory()
>>      46
>>      47     # Background color for marking lines
>>
>> ---> 48     mark_color = Color( 0xECE9D8 )
>>      49
>>      50     # Object trait containing the currently selected line
>> (optional)
>>
>>
>> D:\Python27\lib\site-packages\traits\traits.pyc in __call__(self,
>> *args, **metadata)
>>     485
>>     486     def __call__ ( self, *args, **metadata ):
>> --> 487         return self.maker_function( *args, **metadata )
>>     488
>>     489 class TraitImportError ( TraitFactory ):
>>
>> D:\Python27\lib\site-packages\traits\traits.pyc in Color(*args,
>> **metadata)
>>    1181     from traitsui.toolkit_traits import ColorTrait
>>    1182
>> -> 1183     return ColorTrait( *args, **metadata )
>>    1184
>>    1185 Color = TraitFactory( Color )
>>
>> D:\Python27\lib\site-packages\traitsui\toolkit_traits.pyc in
>> ColorTrait(*args, **traits)
>>       5
>>       6 def ColorTrait ( *args, **traits ):
>> ----> 7     return toolkit().color_trait( *args, **traits )
>>       8
>>       9 def RGBColorTrait ( *args, **traits ):
>>
>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in toolkit(*toolkits)
>>     107     if ETSConfig.toolkit:
>>     108         # If a toolkit has already been set for ETSConfig, then
>> use it:
>>
>> --> 109         _toolkit = _import_toolkit(ETSConfig.toolkit)
>>     110         return _toolkit
>>     111     else:
>>
>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in
>> _import_toolkit(name)
>>      49
>>      50 def _import_toolkit ( name ):
>> ---> 51     return __import__( name, globals=globals(), level=1 ).toolkit
>>      52
>>      53
>>
>> ImportError: No module named qt
>>
>> ------------------------------------------------------------------------------------------------------------------------------------
>>
>> Same happens when I try enaml-running scripts, or calling enaml views
>> from Python files.
>>
>> I've tried setting ETS_TOOLKIT to both 'qt4' and 'wx', neither work.
>>
>> It was all fine until recently when I was using PythonXY. Then I
>> installed EPD and that worked fine too for a while. Funny as it
>> sounds, this looks like it started happening all of a sudden.
>>
>> What could have gone wrong?
>>
>> Thanks
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>



--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPD - Chaco/Enaml error on Windows

Warren Weckesser
I get the same traceback (Mac OSX, EPD 7.3) if I set ETS_TOOLKIT=qt (instead of qt4).

Warren


On Thu, Aug 9, 2012 at 11:36 AM, Robert Kern <[hidden email]> wrote:
On Thu, Aug 9, 2012 at 5:31 PM, Chris Colbert <[hidden email]> wrote:
> Looks like traits is trying to import it's qt backend module, but it doesn't
> exist.

That's because it's called "qt4" not "qt". It's not clear where the
"qt" is coming from.

> On Thu, Aug 9, 2012 at 10:53 AM, Jaidev Deshpande
> <[hidden email]> wrote:
>>
>> Hi,
>>
>> I've installed EPD  on Windows XP, and I also installed PyQt4 using the
>> binary.
>>
>> When I try the following:
>>
>> from chaco.api import Plot
>>
>> I get the following (ridiculously long) traceback:
>>
>>
>> ----------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> ImportError                               Traceback (most recent call
>> last)
>> D:\Documents and
>> Settings\Administrator\Desktop\<ipython-input-1-243b7ec540b2> in
>> <module>()
>> ----> 1 from chaco.api import Plot
>>
>> D:\Python27\lib\site-packages\chaco\api.py in <module>()
>>      35
>>      36 # Visual components
>>
>> ---> 37 from abstract_plot_renderer import AbstractPlotRenderer
>>      38 from abstract_overlay import AbstractOverlay
>>      39 from base_plot_container import BasePlotContainer
>>
>> D:\Python27\lib\site-packages\chaco\abstract_plot_renderer.py in
>> <module>()
>>       5
>>       6 # Local relative imports
>>
>> ----> 7 from plot_component import PlotComponent
>>       8
>>       9 class AbstractPlotRenderer(PlotComponent):
>>
>> D:\Python27\lib\site-packages\chaco\plot_component.py in <module>()
>>       2 """
>>       3 # Enthought library imports
>>
>> ----> 4 from enable.api import Component
>>       5 from enable.kiva_graphics_context import GraphicsContext
>>       6 from traits.api import Bool, Instance, Str
>>
>> D:\Python27\lib\site-packages\enable\api.py in <module>()
>>      10     empty_rectangle, intersect_bounds
>>      11
>> ---> 12 from enable_traits import basic_sequence_types,
>> sequence_types, pointer_shapes, \
>>      13      CURSOR_X, CURSOR_Y, cursor_styles, border_size_editor,
>> font_trait, \
>>      14      bounds_trait, ComponentMinSize, ComponentMaxSize,
>> Pointer, cursor_style_trait, \
>>
>> D:\Python27\lib\site-packages\enable\enable_traits.py in <module>()
>>      11 from traits.api import Trait, Range, TraitPrefixList,
>> TraitPrefixMap, \
>>      12     List, TraitFactory
>> ---> 13 from traitsui.api import ImageEnumEditor, EnumEditor
>>      14 # Try to get the CList trait; for traits 2 backwards
>> compatibility, fall back
>>
>>      15 # to a normal List trait if we can't import it
>>
>>
>> D:\Python27\lib\site-packages\traitsui\api.py in <module>()
>>      33 from .editor_factory import EditorFactory
>>      34
>> ---> 35 from .editors.api import (ArrayEditor, BooleanEditor,
>> ButtonEditor,
>>      36     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>> CustomEditor,
>>      37     CSVListEditor,
>>
>> D:\Python27\lib\site-packages\traitsui\editors\__init__.py in <module>()
>>      20 from __future__ import absolute_import
>>      21
>> ---> 22 from .api import (toolkit, ArrayEditor, BooleanEditor,
>> ButtonEditor,
>>      23     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>> CustomEditor,
>>      24     DateEditor, DefaultOverride, DirectoryEditor, DNDEditor,
>> DropEditor,
>>
>> D:\Python27\lib\site-packages\traitsui\editors\api.py in <module>()
>>       8 from .button_editor import ButtonEditor
>>       9 from .check_list_editor import CheckListEditor
>> ---> 10 from .code_editor import CodeEditor
>>      11 from .color_editor import ColorEditor
>>      12 from .compound_editor import CompoundEditor
>>
>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>> <module>()
>>      34
>> #-------------------------------------------------------------------------------
>>
>>      35
>> ---> 36 class ToolkitEditorFactory ( EditorFactory ):
>>      37     """ Editor factory for code editors.
>>      38     """
>>
>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>> ToolkitEditorFactory()
>>      46
>>      47     # Background color for marking lines
>>
>> ---> 48     mark_color = Color( 0xECE9D8 )
>>      49
>>      50     # Object trait containing the currently selected line
>> (optional)
>>
>>
>> D:\Python27\lib\site-packages\traits\traits.pyc in __call__(self,
>> *args, **metadata)
>>     485
>>     486     def __call__ ( self, *args, **metadata ):
>> --> 487         return self.maker_function( *args, **metadata )
>>     488
>>     489 class TraitImportError ( TraitFactory ):
>>
>> D:\Python27\lib\site-packages\traits\traits.pyc in Color(*args,
>> **metadata)
>>    1181     from traitsui.toolkit_traits import ColorTrait
>>    1182
>> -> 1183     return ColorTrait( *args, **metadata )
>>    1184
>>    1185 Color = TraitFactory( Color )
>>
>> D:\Python27\lib\site-packages\traitsui\toolkit_traits.pyc in
>> ColorTrait(*args, **traits)
>>       5
>>       6 def ColorTrait ( *args, **traits ):
>> ----> 7     return toolkit().color_trait( *args, **traits )
>>       8
>>       9 def RGBColorTrait ( *args, **traits ):
>>
>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in toolkit(*toolkits)
>>     107     if ETSConfig.toolkit:
>>     108         # If a toolkit has already been set for ETSConfig, then
>> use it:
>>
>> --> 109         _toolkit = _import_toolkit(ETSConfig.toolkit)
>>     110         return _toolkit
>>     111     else:
>>
>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in
>> _import_toolkit(name)
>>      49
>>      50 def _import_toolkit ( name ):
>> ---> 51     return __import__( name, globals=globals(), level=1 ).toolkit
>>      52
>>      53
>>
>> ImportError: No module named qt
>>
>> ------------------------------------------------------------------------------------------------------------------------------------
>>
>> Same happens when I try enaml-running scripts, or calling enaml views
>> from Python files.
>>
>> I've tried setting ETS_TOOLKIT to both 'qt4' and 'wx', neither work.
>>
>> It was all fine until recently when I was using PythonXY. Then I
>> installed EPD and that worked fine too for a while. Funny as it
>> sounds, this looks like it started happening all of a sudden.
>>
>> What could have gone wrong?
>>
>> Thanks
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>



--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPD - Chaco/Enaml error on Windows

Jaidev Deshpande
In reply to this post by Robert Kern
On Thu, Aug 9, 2012 at 10:06 PM, Robert Kern <[hidden email]> wrote:
> On Thu, Aug 9, 2012 at 5:31 PM, Chris Colbert <[hidden email]> wrote:
>> Looks like traits is trying to import it's qt backend module, but it doesn't
>> exist.
>
> That's because it's called "qt4" not "qt". It's not clear where the
> "qt" is coming from.

Yeah, it's looking for 'qt' even when ETS_TOOLKIT is set to 'qt4'.

>
>> On Thu, Aug 9, 2012 at 10:53 AM, Jaidev Deshpande
>> <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> I've installed EPD  on Windows XP, and I also installed PyQt4 using the
>>> binary.
>>>
>>> When I try the following:
>>>
>>> from chaco.api import Plot
>>>
>>> I get the following (ridiculously long) traceback:
>>>
>>>
>>> ----------------------------------------------------------------------------------------------------------------------------------------------------
>>>
>>> ImportError                               Traceback (most recent call
>>> last)
>>> D:\Documents and
>>> Settings\Administrator\Desktop\<ipython-input-1-243b7ec540b2> in
>>> <module>()
>>> ----> 1 from chaco.api import Plot
>>>
>>> D:\Python27\lib\site-packages\chaco\api.py in <module>()
>>>      35
>>>      36 # Visual components
>>>
>>> ---> 37 from abstract_plot_renderer import AbstractPlotRenderer
>>>      38 from abstract_overlay import AbstractOverlay
>>>      39 from base_plot_container import BasePlotContainer
>>>
>>> D:\Python27\lib\site-packages\chaco\abstract_plot_renderer.py in
>>> <module>()
>>>       5
>>>       6 # Local relative imports
>>>
>>> ----> 7 from plot_component import PlotComponent
>>>       8
>>>       9 class AbstractPlotRenderer(PlotComponent):
>>>
>>> D:\Python27\lib\site-packages\chaco\plot_component.py in <module>()
>>>       2 """
>>>       3 # Enthought library imports
>>>
>>> ----> 4 from enable.api import Component
>>>       5 from enable.kiva_graphics_context import GraphicsContext
>>>       6 from traits.api import Bool, Instance, Str
>>>
>>> D:\Python27\lib\site-packages\enable\api.py in <module>()
>>>      10     empty_rectangle, intersect_bounds
>>>      11
>>> ---> 12 from enable_traits import basic_sequence_types,
>>> sequence_types, pointer_shapes, \
>>>      13      CURSOR_X, CURSOR_Y, cursor_styles, border_size_editor,
>>> font_trait, \
>>>      14      bounds_trait, ComponentMinSize, ComponentMaxSize,
>>> Pointer, cursor_style_trait, \
>>>
>>> D:\Python27\lib\site-packages\enable\enable_traits.py in <module>()
>>>      11 from traits.api import Trait, Range, TraitPrefixList,
>>> TraitPrefixMap, \
>>>      12     List, TraitFactory
>>> ---> 13 from traitsui.api import ImageEnumEditor, EnumEditor
>>>      14 # Try to get the CList trait; for traits 2 backwards
>>> compatibility, fall back
>>>
>>>      15 # to a normal List trait if we can't import it
>>>
>>>
>>> D:\Python27\lib\site-packages\traitsui\api.py in <module>()
>>>      33 from .editor_factory import EditorFactory
>>>      34
>>> ---> 35 from .editors.api import (ArrayEditor, BooleanEditor,
>>> ButtonEditor,
>>>      36     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>>> CustomEditor,
>>>      37     CSVListEditor,
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\__init__.py in <module>()
>>>      20 from __future__ import absolute_import
>>>      21
>>> ---> 22 from .api import (toolkit, ArrayEditor, BooleanEditor,
>>> ButtonEditor,
>>>      23     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>>> CustomEditor,
>>>      24     DateEditor, DefaultOverride, DirectoryEditor, DNDEditor,
>>> DropEditor,
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\api.py in <module>()
>>>       8 from .button_editor import ButtonEditor
>>>       9 from .check_list_editor import CheckListEditor
>>> ---> 10 from .code_editor import CodeEditor
>>>      11 from .color_editor import ColorEditor
>>>      12 from .compound_editor import CompoundEditor
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>>> <module>()
>>>      34
>>> #-------------------------------------------------------------------------------
>>>
>>>      35
>>> ---> 36 class ToolkitEditorFactory ( EditorFactory ):
>>>      37     """ Editor factory for code editors.
>>>      38     """
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>>> ToolkitEditorFactory()
>>>      46
>>>      47     # Background color for marking lines
>>>
>>> ---> 48     mark_color = Color( 0xECE9D8 )
>>>      49
>>>      50     # Object trait containing the currently selected line
>>> (optional)
>>>
>>>
>>> D:\Python27\lib\site-packages\traits\traits.pyc in __call__(self,
>>> *args, **metadata)
>>>     485
>>>     486     def __call__ ( self, *args, **metadata ):
>>> --> 487         return self.maker_function( *args, **metadata )
>>>     488
>>>     489 class TraitImportError ( TraitFactory ):
>>>
>>> D:\Python27\lib\site-packages\traits\traits.pyc in Color(*args,
>>> **metadata)
>>>    1181     from traitsui.toolkit_traits import ColorTrait
>>>    1182
>>> -> 1183     return ColorTrait( *args, **metadata )
>>>    1184
>>>    1185 Color = TraitFactory( Color )
>>>
>>> D:\Python27\lib\site-packages\traitsui\toolkit_traits.pyc in
>>> ColorTrait(*args, **traits)
>>>       5
>>>       6 def ColorTrait ( *args, **traits ):
>>> ----> 7     return toolkit().color_trait( *args, **traits )
>>>       8
>>>       9 def RGBColorTrait ( *args, **traits ):
>>>
>>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in toolkit(*toolkits)
>>>     107     if ETSConfig.toolkit:
>>>     108         # If a toolkit has already been set for ETSConfig, then
>>> use it:
>>>
>>> --> 109         _toolkit = _import_toolkit(ETSConfig.toolkit)
>>>     110         return _toolkit
>>>     111     else:
>>>
>>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in
>>> _import_toolkit(name)
>>>      49
>>>      50 def _import_toolkit ( name ):
>>> ---> 51     return __import__( name, globals=globals(), level=1 ).toolkit
>>>      52
>>>      53
>>>
>>> ImportError: No module named qt
>>>
>>> ------------------------------------------------------------------------------------------------------------------------------------
>>>
>>> Same happens when I try enaml-running scripts, or calling enaml views
>>> from Python files.
>>>
>>> I've tried setting ETS_TOOLKIT to both 'qt4' and 'wx', neither work.
>>>
>>> It was all fine until recently when I was using PythonXY. Then I
>>> installed EPD and that worked fine too for a while. Funny as it
>>> sounds, this looks like it started happening all of a sudden.
>>>
>>> What could have gone wrong?
>>>
>>> Thanks
>>> _______________________________________________
>>> Enthought-Dev mailing list
>>> [hidden email]
>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>>
>>
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>
>
>
> --
> Robert Kern
> Enthought
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPD - Chaco/Enaml error on Windows

Jaidev Deshpande
In reply to this post by Robert Kern
On Thu, Aug 9, 2012 at 10:06 PM, Robert Kern <[hidden email]> wrote:
> On Thu, Aug 9, 2012 at 5:31 PM, Chris Colbert <[hidden email]> wrote:
>> Looks like traits is trying to import it's qt backend module, but it doesn't
>> exist.
>
> That's because it's called "qt4" not "qt". It's not clear where the
> "qt" is coming from.

Turns out that the etsconfig.py file was initializing the toolkit to
'qt'. Changed it to 'qt4'. Don't know why that was necessary when I
was explicitly setting ETS_TOOLKIT='qt4'.

I'll get away with it this time but I think I should reinstall traits,
that might make ETSConfig() accept 'qt4' as the default toolkit.


>> On Thu, Aug 9, 2012 at 10:53 AM, Jaidev Deshpande
>> <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> I've installed EPD  on Windows XP, and I also installed PyQt4 using the
>>> binary.
>>>
>>> When I try the following:
>>>
>>> from chaco.api import Plot
>>>
>>> I get the following (ridiculously long) traceback:
>>>
>>>
>>> ----------------------------------------------------------------------------------------------------------------------------------------------------
>>>
>>> ImportError                               Traceback (most recent call
>>> last)
>>> D:\Documents and
>>> Settings\Administrator\Desktop\<ipython-input-1-243b7ec540b2> in
>>> <module>()
>>> ----> 1 from chaco.api import Plot
>>>
>>> D:\Python27\lib\site-packages\chaco\api.py in <module>()
>>>      35
>>>      36 # Visual components
>>>
>>> ---> 37 from abstract_plot_renderer import AbstractPlotRenderer
>>>      38 from abstract_overlay import AbstractOverlay
>>>      39 from base_plot_container import BasePlotContainer
>>>
>>> D:\Python27\lib\site-packages\chaco\abstract_plot_renderer.py in
>>> <module>()
>>>       5
>>>       6 # Local relative imports
>>>
>>> ----> 7 from plot_component import PlotComponent
>>>       8
>>>       9 class AbstractPlotRenderer(PlotComponent):
>>>
>>> D:\Python27\lib\site-packages\chaco\plot_component.py in <module>()
>>>       2 """
>>>       3 # Enthought library imports
>>>
>>> ----> 4 from enable.api import Component
>>>       5 from enable.kiva_graphics_context import GraphicsContext
>>>       6 from traits.api import Bool, Instance, Str
>>>
>>> D:\Python27\lib\site-packages\enable\api.py in <module>()
>>>      10     empty_rectangle, intersect_bounds
>>>      11
>>> ---> 12 from enable_traits import basic_sequence_types,
>>> sequence_types, pointer_shapes, \
>>>      13      CURSOR_X, CURSOR_Y, cursor_styles, border_size_editor,
>>> font_trait, \
>>>      14      bounds_trait, ComponentMinSize, ComponentMaxSize,
>>> Pointer, cursor_style_trait, \
>>>
>>> D:\Python27\lib\site-packages\enable\enable_traits.py in <module>()
>>>      11 from traits.api import Trait, Range, TraitPrefixList,
>>> TraitPrefixMap, \
>>>      12     List, TraitFactory
>>> ---> 13 from traitsui.api import ImageEnumEditor, EnumEditor
>>>      14 # Try to get the CList trait; for traits 2 backwards
>>> compatibility, fall back
>>>
>>>      15 # to a normal List trait if we can't import it
>>>
>>>
>>> D:\Python27\lib\site-packages\traitsui\api.py in <module>()
>>>      33 from .editor_factory import EditorFactory
>>>      34
>>> ---> 35 from .editors.api import (ArrayEditor, BooleanEditor,
>>> ButtonEditor,
>>>      36     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>>> CustomEditor,
>>>      37     CSVListEditor,
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\__init__.py in <module>()
>>>      20 from __future__ import absolute_import
>>>      21
>>> ---> 22 from .api import (toolkit, ArrayEditor, BooleanEditor,
>>> ButtonEditor,
>>>      23     CheckListEditor, CodeEditor, ColorEditor, CompoundEditor,
>>> CustomEditor,
>>>      24     DateEditor, DefaultOverride, DirectoryEditor, DNDEditor,
>>> DropEditor,
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\api.py in <module>()
>>>       8 from .button_editor import ButtonEditor
>>>       9 from .check_list_editor import CheckListEditor
>>> ---> 10 from .code_editor import CodeEditor
>>>      11 from .color_editor import ColorEditor
>>>      12 from .compound_editor import CompoundEditor
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>>> <module>()
>>>      34
>>> #-------------------------------------------------------------------------------
>>>
>>>      35
>>> ---> 36 class ToolkitEditorFactory ( EditorFactory ):
>>>      37     """ Editor factory for code editors.
>>>      38     """
>>>
>>> D:\Python27\lib\site-packages\traitsui\editors\code_editor.py in
>>> ToolkitEditorFactory()
>>>      46
>>>      47     # Background color for marking lines
>>>
>>> ---> 48     mark_color = Color( 0xECE9D8 )
>>>      49
>>>      50     # Object trait containing the currently selected line
>>> (optional)
>>>
>>>
>>> D:\Python27\lib\site-packages\traits\traits.pyc in __call__(self,
>>> *args, **metadata)
>>>     485
>>>     486     def __call__ ( self, *args, **metadata ):
>>> --> 487         return self.maker_function( *args, **metadata )
>>>     488
>>>     489 class TraitImportError ( TraitFactory ):
>>>
>>> D:\Python27\lib\site-packages\traits\traits.pyc in Color(*args,
>>> **metadata)
>>>    1181     from traitsui.toolkit_traits import ColorTrait
>>>    1182
>>> -> 1183     return ColorTrait( *args, **metadata )
>>>    1184
>>>    1185 Color = TraitFactory( Color )
>>>
>>> D:\Python27\lib\site-packages\traitsui\toolkit_traits.pyc in
>>> ColorTrait(*args, **traits)
>>>       5
>>>       6 def ColorTrait ( *args, **traits ):
>>> ----> 7     return toolkit().color_trait( *args, **traits )
>>>       8
>>>       9 def RGBColorTrait ( *args, **traits ):
>>>
>>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in toolkit(*toolkits)
>>>     107     if ETSConfig.toolkit:
>>>     108         # If a toolkit has already been set for ETSConfig, then
>>> use it:
>>>
>>> --> 109         _toolkit = _import_toolkit(ETSConfig.toolkit)
>>>     110         return _toolkit
>>>     111     else:
>>>
>>> D:\Python27\lib\site-packages\traitsui\toolkit.pyc in
>>> _import_toolkit(name)
>>>      49
>>>      50 def _import_toolkit ( name ):
>>> ---> 51     return __import__( name, globals=globals(), level=1 ).toolkit
>>>      52
>>>      53
>>>
>>> ImportError: No module named qt
>>>
>>> ------------------------------------------------------------------------------------------------------------------------------------
>>>
>>> Same happens when I try enaml-running scripts, or calling enaml views
>>> from Python files.
>>>
>>> I've tried setting ETS_TOOLKIT to both 'qt4' and 'wx', neither work.
>>>
>>> It was all fine until recently when I was using PythonXY. Then I
>>> installed EPD and that worked fine too for a while. Funny as it
>>> sounds, this looks like it started happening all of a sudden.
>>>
>>> What could have gone wrong?
>>>
>>> Thanks
>>> _______________________________________________
>>> Enthought-Dev mailing list
>>> [hidden email]
>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>>
>>
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>
>
>
> --
> Robert Kern
> Enthought
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPD - Chaco/Enaml error on Windows

Robert Kern
On Thu, Aug 9, 2012 at 9:49 PM, Jaidev Deshpande
<[hidden email]> wrote:

> On Thu, Aug 9, 2012 at 10:06 PM, Robert Kern <[hidden email]> wrote:
>> On Thu, Aug 9, 2012 at 5:31 PM, Chris Colbert <[hidden email]> wrote:
>>> Looks like traits is trying to import it's qt backend module, but it doesn't
>>> exist.
>>
>> That's because it's called "qt4" not "qt". It's not clear where the
>> "qt" is coming from.
>
> Turns out that the etsconfig.py file was initializing the toolkit to
> 'qt'. Changed it to 'qt4'. Don't know why that was necessary when I
> was explicitly setting ETS_TOOLKIT='qt4'.

traits/etsconfig/etsconfig.py ? Our version of that file certainly
doesn't do that. Can you diff against the authoritative version?

https://github.com/enthought/traits/blob/master/traits/etsconfig/etsconfig.py

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev