pysimplegui popup_get_folder default_path
我对pysimplegui的popup_get_folder有问题。我无法设置默认路径,我会收到错误: popup()有一个意外的关键字参数“ default_path”,我该怎么办? popup_get_folder()有一个参数“ default_path”
if event == "BUTTON":
dirfiles = sg.popup_get_folder('Please enter a folder name')
sg.popup('Results', 'The value returned from popup_get_folder', dirfiles, default_path="C:/Users/User/Desktop/NEWFOLDER")
i have a problem with popup_get_folder, PySimpleGUI. i can't set default path, I get error:
popup() got an unexpected keyword argument 'default_path', what can i do? popup_get_folder() has an argument "default_path"
if event == "BUTTON":
dirfiles = sg.popup_get_folder('Please enter a folder name')
sg.popup('Results', 'The value returned from popup_get_folder', dirfiles, default_path="C:/Users/User/Desktop/NEWFOLDER")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看错误消息
错误:popup()获得了一个意外的关键字参数'default_path'
python告诉我们引起错误的函数:
popup
它也告诉我们错误IS:您在参数
default_path
中传递时,当这不是popup
函数所期望的东西时。要查找可以传递到
弹出
函数的参数,您可以查看库的文档: https://pysimplegui.readthedocs.io/en/latest/#high-level-level-level-api-calls-popupsLooking at the error message
error: popup() got an unexpected keyword argument 'default_path'
Python tells us the function that's causing the error:
popup
It also tells us what the error is: you passed in the argument
default_path
when this is not something that thepopup
function is expecting.To find out what arguments you can pass to the
popup
function, you can look at the documentation for the library: https://pysimplegui.readthedocs.io/en/latest/#high-level-api-calls-popups