Can not start boa-constructor successfully
Question: When I start boa-constructor from the command line by starting the script
"Boa.py", I got the message says "

    
    
    D:\Python27\Lib\site-packages\boa-constructor>python Boa.py
    Starting Boa Constructor v0.6.1
    importing wxPython
    reading user preferences
    Traceback (most recent call last):
    File "Boa.py", line 271, in <module>
    import Preferences, Utils
    File "D:\Python27\Lib\site-packages\boa-constructor\Preferences.py", line 151
    in <module>
    execfile(file)
    File "C:\Users\madfrog\.boa-constructor\prefs.rc.py", line 26, in <module>
    splitterStyle = wx.SP_LIVE_UPDATE | wx.SP_3DSASH | wx.NO_3D
    AttributeError: 'module' object has no attribute 'NO_3D'
    

My python version is 2.7.4 and I download wxPyton "32-bit Python 2.7". There
are someone say it because the unmatched wxPython version, but there are only
64-bit or 32 bit for me, I don't know how to handle this problem. Maybe should
I reinstall the python, which version is 2.6?

Thanks for your help.


Answer: I had the same problem. I can't tell you why. I can just tell you how I fixed
it.

After you download and unzip the boa files go into the boa folder (On a Mac
this could be: /Users/your_user_name/Downloads/boa-constructor-0.6.1).

Then: "grep" for every file containing NO_3D (or use whatever you want to
search for a string in a set of files, I don't know how windows does this): In
my case I did: grep -ir NO_3D *

A list of files comes up. Simply edit each such file (there are ~6) and remove
any mentioning of "wx.NO_3D".

E.g., in Companions/BaseCompanions.py I find a match:

    
    
    "self.windowStyles = ['wx.CAPTION', 'wx.MINIMIZE_BOX', 'wx.MAXIMIZE_BOX',
            'wx.THICK_FRAME', 'wx.SIMPLE_BORDER', 'wx.DOUBLE_BORDER',
            'wx.SUNKEN_BORDER', 'wx.RAISED_BORDER', 'wx.STATIC_BORDER',.
            'wx.TRANSPARENT_WINDOW', 'wx.NO_3D', 'wx.TAB_TRAVERSAL',.
            'wx.WANTS_CHARS', 'wx.NO_FULL_REPAINT_ON_RESIZE', 'wx.VSCROLL',.
            'wx.HSCROLL', 'wx.CLIP_CHILDREN', 'wx.NO_BORDER', 'wx.ALWAYS_SHOW_SB']"
    

You see the '**wx.NO_3D** ' in the middle somewhere. Remove it and save the
file. Keep doing this for all files.

However, there is a minor complication in one file: "Inspector.py". Here, you cannot simply remove wx.NO_3D. In particular, the match is: **self.categories = wx.SplitterWindow(self, -1, style=wx.NO_3D | wx.SP_3D | wx.SP_LIVE_UPDATE)**

What I did was to replace "style=wx.NO_3D" with "style=wx.DEFAULT_FRAME_STYLE"
(I found this default name in one of the other files; you see how there are
different "styles" recognized by the program so I just chose some other style
than NO_3D).

Then I just ran Boa with: "python Boa.py"

and it worked (assuming you have the module wx installed and whatever else is
needed for Boa to run in the first place of course).

