我似乎找不到Convert to Dictionary关键字的任何示例,因此我不确定如何使用它
以下代码:
${newdomain_dict} Convert To Dictionary {'id': 'newdomain', 'entityTypes': ['users', 'msg', 'xmpp']}
给出错误“ValueError:字典更新序列元素#0的长度为1;需要2”
文档只是说这个关键字有一个参数(item),所以我不确定这个“item”是什么意思——我假设是一个字符串。甚至当我在github上查看源代码时,我也得到了这样的印象
这是因为参数
{'id': 'newdomain', 'entityTypes': ['users', 'msg', 'xmpp']}
被视为字符串该关键字的文档说明如下:
字符串不是映射类型
如果希望通过字符串定义字典,可以使用robot的inline python evaluation
相关问题 更多 >
编程相关推荐