JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

parser.add_argument()已经设置了默认值,但调试时仍然报错:main.py: error: the following arguments are required: data

发布时间 2023-05-26 15:40:23作者: Kurie

报错的代码:
parser.add_argument('data', type=str, default='/home/user1/datasets/cifar10', help='path to dataset')
在data前加"--",修改后的代码:
parser.add_argument('--data', type=str, default='/home/user1/datasets/cifar10', help='path to dataset')

    本栏目推荐文章
  • 【LeetCode 】练习str_to_date函数;over(rows between CURRENT ROW AND 2 following)实现【当月和接下来2个月】滑动窗口
  • devmapper: Thin Pool has 162394 free data blocks which is less than minimum required 163840 free data blocks
  • sqlsugar在使用mysql时,Dbfirst and Codefirst requires system table permissions
  • python报错:`visualize_sharding` requires `rich` to be installed.
  • pycharm运行 appium ios自动化,报错TypeError: __init__() got an unexpected keyword argument 'desired_capabilities'
  • TypeError: WebDriver.__init__() got an unexpected keyword argument 'executable_path'报错解决方案
  • Required request body is missing报错及解决
  • idea反编译报Unable to provision, see the following errors:
  • Requires: libpython3.6m.so.1.0()(64bit)
  • 3种依赖管理工具实现requirements.txt文件生成
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们