gpt4 book ai didi

python - 如何修复 Scyther ex.splash 屏幕错误?

转载 作者:行者123 更新时间:2023-12-01 00:17:23 29 4
gpt4 key购买 nike

安装了 Scyther 以及 Graphwiz 和 wxPython 后,我收到错误:

File "scyther-gui.py", line 141, in <module>
class MySplashScreen(wx.SplashScreen):

属性错误:“模块”对象没有属性“SplashScreen”

最佳答案

这显然是因为 Scyther 是用旧版本的 wxPython 编写的。

我发现Thomas Fleming已经更新了wxPython的最新版本(我有4.0.7.post2),你可以找到他的GitHub存储库here 。看起来它会在某个时刻被拉入主分支,但此刻我使用了他的 fork 。 自述文件中的说明非常清楚,我遵循它们没有问题,但对我来说,文件 scyther-linux 并未自动从 /src 复制到 /gui 所以我必须手动移动它。

他的修复似乎也适用于 mac 上的用户,但是,我使用的是 Ubuntu 18.4,尽管我克服了闪屏错误并加载了 Scyther,但我无法打开文件,变得

File "/home/weaver/tools/scyther-master/gui/Gui/Mainwindow.py", line 291, in OnOpen
if self.askUserForFilename(style=wx.OPEN,
AttributeError: 'module' object has no attribute 'OPEN'

和保存的等效内容。

为了解决这个问题,我打开了 /gui/Gui/Mainwindow.py,并将第 291 行更改为

if self.askUserForFilename(style=wx.OPEN,

if self.askUserForFilename(style=wx.FD_OPEN,

第 302 行对 wx.SAVE 执行了相同的操作,将其更改为 wx.FD_SAVE

到目前为止,一切似乎运行良好。

希望这有帮助。

关于python - 如何修复 Scyther ex.splash 屏幕错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59225925/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com