error: the following arguments are required: cfg_file
error: the following arguments are required: cfg_file
这里一共列举4种情况:
1)参数前面没有加--
2)参数没有加default值
3)没有这个参数
4)这个参数不必要
情况1.:参数前面没有加--,加上--符号即可:
parser = argparse.ArgumentParser(description="Test CornerNet")
parser.add_argument("cfg_file", help="config file",default=r'config/ExtremeNet.json', type=str)
正确写法:
parser = argparse.ArgumentParser(description="Test CornerNet")
parser.add_argument("--cfg_file", help="config file",default=r'config/ExtremeNet.json', type=str)
情况2:没有加default值
加上default即可:
parser = argparse.ArgumentParser(description="Test CornerNet")
parser.add_argument("--cfg_file", help="
error: the following arguments are required: cfg_file相关推荐
- (理解和3种方法完全解决pycharm报错)main.py: error: the following arguments are required: -d/--dataset
文章目录 背景 理解 完全解决 方法1 方法2 方法3 背景 很多人只说解决方案,却不说原因,遂有此篇. 在pycharm中直接运行如下代码main.py报错: import argparse if ...
- python3 运行argparse XX.py: error: the following arguments are required: N An exception has occurred,
Spyder(python 3.6) 运行含argparse模块的程序 # max sum.py import argparseparser = argparse.ArgumentParser(des ...
- error: the following arguments are required: img, config, checkpoint
目录 01问题描述 02 问题分析 03 解决方案 01问题描述 在验证mmdetection环境是否安装成功的时候,出现如下错误: error: the following arguments a ...
- main.py: error: the following arguments are required:
报错 "main.py: error: the following arguments are required:" 1.首先查看报错信息 如图下图所示 main.py: erro ...
- error: the following arguments are required
[1]usage: run_one_image.py [-h] [--use_cuda] [--use_cython] image_path templ ...
- “ error: the following arguments are required: --model, --data“解决办法
"error: the following arguments are required: --model, --data"解决办法 问题描述 解决办法 问题描述 pycharm运 ...
- train.py: error: the following arguments are required: --config解决办法
train.py: error: the following arguments are required: --config解决办法 最近在跑github上的深度学习开源项目,在导入项目运行trai ...
- error: the following arguments are required: --cfg
先看错误代码: parser.add_argument('--cfg', type=str, required=True, metavar="FILE", help='path t ...
- CentOS 6.5 安装 Redis 执行 make #error Newer version of jemalloc required
为什么80%的码农都做不了架构师?>>> CentOS 6.5 安装 Redis 执行 make #error "Newer version of jemalloc ...
最新文章
- svm涉及的一些概念
- vs显示堆栈数据分析_什么是“数据分析堆栈”?
- “做好大数据测试,我是认真的!”
- Qt的信号槽机制介绍(含Qt5与Qt4的差异对比)
- vs编译调试遇到问题
- 关于用户身份及密码问题的说明
- Layer 提示框tips使用(批量提示)
- 关于无法卸载和安装VISIO2010的问题
- COMSOL光纤建模、光子带隙分析等
- 空气螺旋桨,让水下动物不再受伤害
- 芒果TV广告投放的展现样式!芒果TV广告投放如何收费?
- git(icode)分支及发布管理方式
- img元素实现图片裁切放大
- 图像分割之(四)OpenCV的GrabCut函数使用和源码解读
- Python3操作EXCEL,取汉字首字母,拼接全拼
- VMware虚拟机使用虚拟机网络编辑器NAT模式配置网络图文教程,实现联网功能并测试
- 中国史上战斗力最强的5支部队(冷兵器时代)
- c语言程序设计策划书,C语言程序设计大赛策划书(陈雷)
- 光学基础知识:焦点、弥散圆、景深:概念与计算
- gitlab配置SMTP方式发送邮件
热门文章
- JAVA String.format 方法使用介绍
- 数据结构 - 完全二叉树
- 使用eBPFBCC提取内核网络流量信息
- vscode 调试html页面,vscode调试HTML
- java 调用codesoft_请问各位前辈高人,java调用codesoft,如何给lab文件中的变量赋...
- android fm 耳机,Android杂谈:音频调试小计
- PHP开启session的函数,ThinkPHP中session函数详解
- maven 打包_一次打包引发的思考,原来maven还可以这么玩~
- java mvc 小程序_[Java教程]Spring MVC 的环境搭建和入门小程序
- 不会被计算机打败的棋类游戏,电脑首次打败人类围棋冠军意味着什么?