Re: Errors running a Chaco/Traits .exe file

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

Re: Errors running a Chaco/Traits .exe file

joel kim
I have the exactly same problem.
Anybody can share the solution script with any tools? (py2exe, bb_freeze, etc)

-------------------
I tried to make a standalone exe file from Traits/Chaco script with
qt4 backend using py2exe and bb_freeze.
I succeeded in making the exe file but when I executed it, I got the
following error message:

Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "__main__.py", line 105, in <module>
  File "__main__hello_world__.py", line 4, in <module>
  File "enthought\chaco\api.py", line 36, in <module>
  File "enthought\chaco\abstract_plot_renderer.py", line 7, in <module>
  File "enthought\chaco\plot_component.py", line 4, in <module>
  File "enthought\enable\api.py", line 8, in <module>
  File "enthought\enable\base.py", line 42, in <module>
  File "enthought\enable\colors.py", line 243, in <module>
  File "enthought\traits\ui\qt4\color_editor.py", line 21, in <module>
  File "enthought\traits\ui\editors\__init__.py", line 22, in <module>
  File "enthought\traits\ui\editors\api.py", line 27, in <module>
  File "enthought\traits\ui\editors\list_str_editor.py", line 33, in <module>
  File "enthought\pyface\image_resource.py", line 19, in <module>
  File "enthought\pyface\toolkit.py", line 97, in toolkit_object
  File "enthought\pyface\ui\qt4\image_resource.py", line 25, in <module>
  File "enthought\pyface\i_image_resource.py", line 16, in <module>
  File "enthought\pyface\resource_manager.py", line 27, in <module>
  File "enthought\pyface\toolkit.py", line 92, in __init__
NotImplementedError: the qt4 pyface backend doesn't implement
PyfaceResourceFactory
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Errors running a Chaco/Traits .exe file

Robert Kern
On Thu, Jul 22, 2010 at 6:56 PM, Doh-Hyoung Kim <[hidden email]> wrote:
> I have the exactly same problem.
> Anybody can share the solution script with any tools? (py2exe, bb_freeze, etc)

You need to explicitly include the qt4-specific packages, namely

  enthought.pyface.ui.qt4
  enthought.traits.ui.qt4
  enthought.enable.qt4_backend

You must also include all of the necessary data directories (typically
images/ directories). You can locate those easily.

I recommend not having the tool package the libraries into a .zip but
leaving them as plain files on the filesystem.

How you do these things is different for each tool. You must consult
the tool's documentation.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev