robotframework获取数据库返回值“Expression must be a string ,not long”
来源:互联网 发布:抗风柱设计软件 编辑:程序博客网 时间:2024/06/06 07:16
使用ride连接mysql数据库,执行select后,返回的值为tuple类型,并且每个元素都为long类型,如下:
想获取某个元素的值,其实采用数组读取元素的方式即可,$[][],如下:
运行结果为:
正确提取了第3个元素,不过记住要将结果转成str类型,否则运行会报错,提示如下:
另外,从数据库获取查询条件的记录条数时也是一样的道理,之前我以为select count(*)返回的是int类型,后来发现其实返回结果是long类型
运行:
同理如果想获取72这个数字,也需要转换成str类型才行
阅读全文
0 0
- robotframework获取数据库返回值“Expression must be a string ,not long”
- 'AddressOf' expression cannot be converted to 'Long' because 'Long' is not a delegate type.解决办法
- E0137 expression must be a modifiable lvalue
- Uncaught TypeError: Super expression must either be null or a function, not undefine
- int() argument must be a string or a number, not 'SimpleLazyObject'
- gpstop failed. (Reason='int() argument must be a string or a number, not 'NoneType'') exiting...
- 异常 int() argument must be a string or a number, not 'ShopCar'
- string input must not be null解决办法
- 【原】React Native踩坑系列之-Super expression must either be null or a function, not undefined
- can't use a string pattern on a bytes-like object错误和must be str, not bytes错误
- could not be set to a 'string' value. You must set this property to a non-null value of type
- JSON keys must not be null nor the \'null\' string.
- TypeError: argument 1 must be string or buffer, not instance
- Python TypeError: must be string or buffer, not dict
- 【转帖】argument after ** must be a mapping, not list
- 关于jstl问题Static attribute must be a String literal
- Name of an object member must be a string
- SSL.py TypeError: data must be a byte string
- Spring AOP实现声明式事务代码分析
- el表达式的转义字符。
- Android常用开发工具类
- @property相关的问题
- Dialog风格的Activity
- robotframework获取数据库返回值“Expression must be a string ,not long”
- Java连接WebServce
- ssh 用法
- Laravel 5.4 官方文档摘记:请求实例
- 机器学习与深度学习(一) 决策树算法 (Decision Tree)
- 动态链接库导出模板类以及一些问题
- 具有P2P及防盗链功能的OTT/IPTV互联网解决方案
- 55 Jump Game
- 将github上的项目整合到jitpack