原代码如下:
from gooey import Gooey, GooeyParser
@Gooey(program_name="简单的实例")
def main():
parser = GooeyParser(description="第一个示例!")
parser.add_argument('文件路径', widget="FileChooser") # 文件选择框
parser.add_argument('日期', widget="DateChooser") # 日期选择框
args = parser.parse_args() # 接收界面传递的参数
print(args)
if __name__ == '__main__':
main()
运行以后报错:
usage: ipykernel_launcher.py [-h] [--debug] [--quiet] [--init] [--no-stdout]
[--no-stderr] [--trio-loop] [--autoindent]
[--no-autoindent] [--automagic] [--no-automagic]
[--pdb] [--no-pdb] [--pprint] [--no-pprint]
[--color-info] [--no-color-info] [--ignore-cwd]
[--no-ignore-cwd] [--nosep] [--secure]
[--no-secure] [--profile-dir ProfileDir.location]
[--profile IPKernelApp.profile]
[--ipython-dir IPKernelApp.ipython_dir]
[--log-level IPKernelApp.log_level]
[--config IPKernelApp.extra_config_file]
[--ip IPKernelApp.ip] [--hb IPKernelApp.hb_port]
[--shell IPKernelApp.shell_port]
[--iopub IPKernelApp.iopub_port]
[--stdin IPKernelApp.stdin_port]
[--control IPKernelApp.control_port]
[-f IPKernelApp.connection_file]
[--transport IPKernelApp.transport]
[--autocall ZMQInteractiveShell.autocall]
[--colors ZMQInteractiveShell.colors]
[--logfile ZMQInteractiveShell.logfile]
[--logappend ZMQInteractiveShell.logappend]
[-c IPKernelApp.code_to_run]
[-m IPKernelApp.module_to_run]
[--ext IPKernelApp.extra_extensions]
[--gui IPKernelApp.gui]
[--pylab [IPKernelApp.pylab]]
[--matplotlib [IPKernelApp.matplotlib]]
[--cache-size ZMQInteractiveShell.cache_size]
[--ident Session.session]
[--user Session.username]
[--keyfile Session.keyfile]
[extra_args [extra_args ...]]
ipykernel_launcher.py: error: unrecognized arguments: --ignore-gooey
请问这是什么原因导致的
下面的链接应该可以帮助你:
https://www.codeleading.com/article/34712333688/
https://coderedirect.com/questions/192627/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter
如有帮助,请采纳,多谢!