所以我今天在调试我的一些代码并注意到输出中有一条新消息:
can't invoke "event" command: application has been destroyed
while executing
"event generate $w <<ThemeChanged>>"
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"
Run Code Online (Sandbox Code Playgroud)
我在 SO 上查看了有关它的问题,但它们与此错误实例无关。至于 ttk 小部件,我没有在我的代码中使用过一次 ttk,在我的代码中搜索字符串“ttk”不会产生任何结果。
输出这个的代码块:
def GoToEvent(self, controller, driver):
wait = WebDriverWait(driver, 600)
var = Vars()
entertain = var.GetVars("Link")
if type(entertain) == type(""):
event = var.GetVars("Event")
entertain = driver.find_element_by_partial_link_text(event)
entertain.click()
try:
# we have to wait for the page to refresh, the last thing that seems to be updated is the title
wait.until(EC.title_contains("Entertain"))
finally:
# …Run Code Online (Sandbox Code Playgroud)