【发布时间】:2023-04-09 00:34:01
【问题描述】:
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
help="path to input image")
args = vars(ap.parse_args())
当我使用时
python image.py -- image C/:.... path of image .....
我收到错误消息:
waterhed.py [-h] -i IMAGE waterhed.py: error: unrecognized arguments
为什么会出现此错误,我该如何解决?
【问题讨论】:
标签: python image-processing command-line-arguments