terminate called after throwing an instance of 'YAML::TypedBadConversion<int>'what():  bad conversion
已放弃(吐核)

一般是yaml没有有找到yaml文件,此时应该在正确路径建立yaml,确保代码访问的到。
在文件中没有找到代码中要取的对应项也会报此错误,此时应该添加此项,如下,配置文件中没有d0或者SdiID就会报此错误。

cmdinfo0->SdiID = config["d0"]["SdiID"].as<int>();

很多时候已经以上两者都完成了但依然会报类似错误,一个原因就是打开加载了配置文件,没有关闭文件,导致文件中所有信息丢失,这样下次再打开文件取数据就会报这样的错误。
打开加载配置文件:

config = YAML::LoadFile("config.yaml");
ofstream fout("config.yaml");

关闭配置文件。

fout << config;
fout.close();

terminate called after throwing an instance of ‘YAML::TypedBadConversion<int>‘ what(): bad conver相关推荐

  1. 学习笔记50--terminate called after throwing an instance of ‘YAML::BadFile‘ what(): bad file报错踩坑

    环境:ubuntu20.04,ros-noetic 背景:项目需要,折腾一些ros1包,其中涉及一些yaml文件读取 包涉及yaml文件的读取,编译时,有报错提示: .... WORK_SPACE_P ...

  2. XGB模型训练报错 terminate called after throwing an instance of ‘std::bad_alloc‘ what()

    背景:需要做XGB模型增量训练,但是因为一些原因没有得到原来的XGB模型,只有dump文件. XGB模型的dump文件是它的树结构存储为一个相对人类好理解的模型文件,但并不能被重新加载进XGB进行增量 ...

  3. terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr

    运行时报错: terminate called after throwing an instance of 'std::out_of_range' what():  basic_string::sub ...

  4. 《视觉SLAM 十四讲》第五讲 实践:拼接点云-编译遇到的terminate called after throwing an instance of 'pcl::IOException问题及解决方法

    <视觉SLAM 十四讲>第五讲 实践:拼接点云-编译遇到的terminate called after throwing an instance of 'pcl::IOException问 ...

  5. 【已解决】terminate called after throwing an instance of ‘cv::Exception‘,已放弃 (核心已转储)

    这是运行高翔slambook2的代码出现的错误 terminate called after throwing an instance of 'cv::Exception' what(): OpenC ...

  6. Linux运行python文件出现以下错误:terminate called after throwing an instance of ‘std::runtime_error‘

    Linux运行python文件出现以下错误:terminate called after throwing an instance of 'std::runtime_error'

  7. 【Debug记录】terminate called after throwing an instance of ‘xxxxxx‘

    项目场景: 问题描述 terminate called after throwing an instance of 'xxxxxx' 编译没问题,但运行出错 原因1:内存不足 解决方案: 查看当前所有 ...

  8. terminate called after throwing an instance of ‘std::runtime_error‘ what(): locale::facet::_S_cre

    在运行程序时出错: terminate called after throwing an instance of 'std::runtime_error'   what():  locale::fac ...

  9. 报错信息 terminate called after throwing an instance of ‘std::cad_alloc‘ what():std::bad_alloc

    最近做了一道bfs算法的程序题 输入测试数据后卡在运行框中 然后会产生一个错误信息 第一次见到这样的报错于是记录一下解决过程 terminate called after throwing an in ...

最新文章

  1. Bitmap基本概念及在Android4.4系统上使用BitmapFactory的注意事项
  2. 发布 EasyTrac 0.1.0.11b2
  3. 异步/同步、阻塞/非阻塞的理解
  4. RequireJS首次加载偶尔失败
  5. Linux系统新建用户用ssh远程登陆显示-bash-4.1$
  6. OpenGL基本窗口和OpenGL 初始化
  7. js 运算符 语句
  8. Gridview应用技巧——如何为行添加事件
  9. 三层加过的注释java_spring框架中三层架构相关的注解
  10. kbengine 的 nginx反向代理https/wss 配置 支持kbe负载均衡
  11. angularjs中使用ng-repeat渲染最后一个li的时候设置不同样式
  12. gimp 抠图_gimp软件如何实现抠图?
  13. html css 书签,CSS实现书签图案的效果
  14. 超详细的测试理论基础知识
  15. “CHK文件恢复”和“文件恢复”有什么区别?
  16. mermaid与flowchart.js绘制流程图分支结构试验
  17. Unity动态绘制多边形
  18. mumu血压计母亲节“拼团”盛大开启,百度与厂商打造双赢局面
  19. Deep RGB-D Saliency Detection with Depth-Sensitive Attention and Automatic Multi-Modal Fusion论文笔记
  20. python-CST MWS自动采样

热门文章

  1. MySQL数据库的查询语句的应用
  2. tomcat服务器work文件夹说明
  3. 基于FPGA 的毫米波雷达系统
  4. PyQt5自定义无边框窗口
  5. tcp state linux,Linux Kernel ‘tcp_rcv_state_process()’函数拒绝服务漏洞
  6. 技术经理成长复盘-要懂一些项目管理的知识
  7. 通俗理解ROC曲线(Receiver Operating Characteristic Curve)
  8. JQuery图片抽奖
  9. 计算机视觉方向简介 | 深度学习3D重建
  10. 263企业邮箱imap服务器,263企业邮箱实现IMAP邮箱搬家功能