-
Notifications
You must be signed in to change notification settings - Fork 1
求助,运行时tkinter报错 #1
Comments
Hello, this error may be because of 'ttkbootstrap module 你好,这个报错可能是因为'ttkbootstrap'模块 Errors occur on line 34 错误出现在第34行 Please try to modify the code 请尝试修改代码 root = ttk.Window()
root.geometry( "1200x800" )
root.title( "EdgeGPT-GUI" ) 找到第34行,并由上面的代码改为下面的代码 Find line 34 and change the code to the code below root = tk.Window()
root.geometry( "1200x800" )
root.title( "EdgeGPT-GUI" ) Please try it. I hope it will help you 请尝试一下,希望对你有帮助 |
您好,以下是我询问Bing后得到的结果
|
这样也不行,AttributeError: module 'tkinter' has no attribute 'Window' ❯ python3 EdgeGPT-GUI.py
Traceback (most recent call last):
File "/Users/potapo/github/EdgeGPT-GUI/EdgeGPT-GUI.py", line 34, in <module>
root = tk.Window()
AttributeError: module 'tkinter' has no attribute 'Window' |
抱歉是我的疏忽,应改为 root = tk.Tk()
root.geometry( "1200x800" )
root.title( "EdgeGPT-GUI" ) |
我查了一下这好像是python不匹配Mac自带的tkinter的问题,我重新装一下python试试 |
搞定了,中间出现了这个错误 ❯ python EdgeGPT-GUI.py
Traceback (most recent call last):
File "/Users/potapo/github/EdgeGPT-GUI/EdgeGPT-GUI.py", line 37, in <module>
root.attributes( "-toolwindow" , 2 ) #只保留退出键
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1976, in wm_attributes
return self.tk.call(args)
_tkinter.TclError: bad attribute "-toolwindow": must be -alpha, -fullscreen, -modified, -notify, -titlepath, -topmost, -transparent, or -type 我把这一行注释了就好了 |
The text was updated successfully, but these errors were encountered: