出于某种原因,当我使用 Pyinstaller 编译我的应用程序时,它在运行时给了我一个错误:
Traceback (most recent call last):
File "<string>", line 2, in <module>
AttributeError: 'module' object has no attribute 'activex'
还有我的代码的顶部(代码本身非常长)。我还删除了顶部的一大堆数组,其中包含应用程序的文本。
from wxPython.wx import *
from wx import *
from wx.lib.wordwrap import wordwrap
import sys, os, re
class CheatulousFrame(wxFrame):
APP_STORAGE = ""
APP_REGISTERED = False
APP_WORKING = False
## ARRAYS GO HERE
def __init__(self, parent, ID, title):
wxFrame.__init__(self, parent, ID, title, (-1, -1), wxSize(600, 300))
self.Centre()
self.Bind(EVT_CLOSE, self.quitApp)
self.getDataPath()
self.checkRegistered()
self.menuBar = wxMenuBar()
self.createMenu(self.file_menu, "File")
self.createMenu(self.conn_menu, "Connection")
if self.APP_REGISTERED:
self.createMenu(self.regt_menu, "Registration")
else:
self.createMenu(self.regf_menu, "Registration")
self.createMenu(self.devt_menu, "Dev Tools")
self.SetMenuBar(self.menuBar)