无法成功启动 boa-constructor [英] Can not start boa-constructor successfully

查看:39
本文介绍了无法成功启动 boa-constructor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过启动脚本Boa.py"从命令行启动 boa-constructor 时,我收到消息说

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'

我的 Python 版本是 2.7.4,我下载了 wxPyton32 位 Python 2.7".有人说是因为wxPython版本无敌,但是我只有64位或者32位,不知道怎么处理这个问题.也许我应该重新安装python,哪个版本是2.6?

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?

感谢您的帮助.

推荐答案

我遇到了同样的问题.我不能告诉你为什么.我可以告诉你我是如何修复它的.

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

下载并解压 boa 文件后进入 boa 文件夹(在 Mac 上,这可能是:/Users/your_user_name/Downloads/boa-constructor-0.6.1).

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).

然后:为每个包含 NO_3D 的文件grep"(或使用任何你想在一组文件中搜索字符串的内容,我不知道 windows 是如何做到的):就我而言,我做了:grep -ir NO_3D *

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 *

出现文件列表.只需编辑每个这样的文件(有~6 个)并删除任何提及wx.NO_3D"的内容.

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

例如,在 Companions/BaseCompanions.py 中,我找到了一个匹配项:

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']"

您会在中间某处看到wx.NO_3D".删除它并保存文件.继续对所有文件执行此操作.

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

但是,在一个文件中存在一个小问题:Inspector.py".在这里,您不能简单地删除 wx.NO_3D.特别是,比赛是:self.categories = wx.SplitterWindow(self, -1,样式=wx.NO_3D |wx.SP_3D |wx.SP_LIVE_UPDATE)

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)

我所做的是将style=wx.NO_3D"替换为style=wx.DEFAULT_FRAME_STYLE"(我在其他文件之一中找到了这个默认名称;您会看到程序识别出不同的样式"所以我只是选择了一些其他的风格而不是 NO_3D).

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).

然后我就用以下命令运行了 Boa:"python Boa.py"

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

并且它起作用了(假设您已经安装了 wx 模块以及 Boa 首先需要运行的任何其他东西).

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).

这篇关于无法成功启动 boa-constructor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆