小编maa*_*mar的帖子

AttributeError:命名空间对象没有属性“accumulate”

这是我当前的代码:

parser = argparse.ArgumentParser(description='Optic disc segmentation.')
parser.add_argument('-f', dest='file', action='store', type=str, help='The image to process.')
args = parser.parse_args()
print(args.accumulate(args.integers))
Run Code Online (Sandbox Code Playgroud)

我在最后一行不断收到此错误:

AttributeError: 'Namespace' object has no attribute 'accumulate'
Run Code Online (Sandbox Code Playgroud)

python argparse

-2
推荐指数
1
解决办法
4880
查看次数

标签 统计

argparse ×1

python ×1