jmeter报错---javax.script.ScriptException: UnicodeEncodeError: 'ascii' codec can't encode characters in position 109-111: ordinal not in range(128) in <script> at line number 3

python代码:

import json
supplyRelationResultList=vars.get("supplyRelationResultList")
log.info("supplyRelationResultList==="+str(supplyRelationResultList))

  报错原因:最后一行中的str去掉就可以了,已经是字符串了,不需要再次转换成字符串,改为下方即可:

log.info("supplyRelationResultList==="+supplyRelationResultList)
posted @ 2022-04-08 19:01  米小乐1122  阅读(453)  评论(0编辑  收藏  举报