Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:19:31+00:00 2026-06-03T04:19:31+00:00

I am trying do pack my program with py2exe. It uses traits GUI. After

  • 0

I am trying do pack my program with py2exe. It uses traits GUI.
After moving the import statement in image.py in function “convert_image” out of the try block the crated exe fails at the second of the following points:

1: dist\traitsui\ui_traits.py: from .image.image import ImageLibrary
2: dist\traitsui\image\image.py: from traitsui.ui_traits import HasBorder, HasMargin, Alignment

File Structure:

root
+-...
+-main.py
+-setup.py
+-dist
  +-...
  +-main.exe
  +-traitsui
    +-...
    +-ui_tratis.py
    +-image
      +-image.py

By adding the follow to the image.py

import sys
raise Exception(str(sys.path))

I get: Exception: [‘C:\Users…\dist\.’]
So it seems that the path is set right.


The error trace:

Traceback (most recent call last):
  File "main.py", line 8, in <module>
  File "gui\FileSelect.pyc", line 8, in <module>
  File "traitsui\api.pyc", line 27, in <module>
  File "traitsui\basic_editor_factory.pyc", line 30, in <module>
  File "traitsui\editor_factory.pyc", line 32, in <module>
  File "traitsui\helper.pyc", line 32, in <module>
  File "C:\Users\...\dist\.\traitsui\ui_traits.py", line 158, in <module>
    from .image.image import ImageLibrary
  File "C:\Users\...\dist\.\traitsui\image\image.py", line 34, in <module>
    from traitsui.ui_traits import HasBorder, HasMargin, Alignment
ImportError: cannot import name HasBorder

setup.py: https://gist.github.com/2570888

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:19:32+00:00Added an answer on June 3, 2026 at 4:19 am

    hmm it seams that there was somthing wrong with the Enthought package I used for the images.

    So here the new setup file which works:
    https://gist.github.com/2570888

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert a basic tkinter GUI program to an .exe using py2exe.
I am trying out the HTML Agility Pack for the first time and I
I've been trying to pack my app with py2exe. The application works fine but
I'm trying to make a simple program that continually displays and updates a label
I'm have horrendous problems trying to get a JOGL program compiling using Netbeans 6.9.
Basically I am trying to pack OpenNI Kinect into RT-middleware framework. The OpenNI Kinect
I'm trying to setup a development environement with Oracle Enterprise Pack for Eclipse. I
I am trying to use the HTML Agility pack to scrape some data from
Im using HTML Agility Pack, and Im trying to replace the InnerText of some
I'm trying to install the latest v5.0.0 beta 2 BlackBerry OS Component Pack into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.