result_json = json.loads(result)
Windows上运行无误,Linux下Docker运行时出现如题报错: TypeError: the JSON object must be str, not 'bytes',
改为如下即可,亲测可用:
result_json = json.loads(result.decode('utf-8'))
另外,在网上搜了搜,发现还有如下方案,未验证
(result.decode())
(str(result), encoding='utf-8')