humandeng 2022-04-15 21:31 采纳率: 90%
浏览 171
已结题

tkinter使用windnd突然提示module 'windnd' has no attribute 'hook_dropfiles'

这段代码
import tkinter
import windnd
def dragged_files(files):
msg = '\n'.join((item.decode('gbk') for item in files))
print(msg)
tk = tkinter.Tk()
windnd.hook_dropfiles(tk,func=dragged_files)
tk.mainloop()
不知道为什么会突然提示AttributeError:module 'windnd' has no attribute 'hook_dropfiles'
我昨天运行时是好的。今天开机再运行就突然提示这个。

  • 写回答

1条回答 默认 最新

  • humandeng 2022-04-15 22:20
    关注

    自己已经弄明白了。文件名的问题。

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 4月15日
  • 创建了问题 4月15日