def base_write_img(self): # 1.获取图片文件流 with open("./image/err.png", "rb") as f: # 2.调用allure.attach附加方法 allure.attach("原因:", f.read(), allure.attachment_type.PNG)
INTERNALERROR> File "D:\Python\Python39\lib\json\encoder.py", line 179, in default
INTERNALERROR> raise TypeError(f'Object of type {o.__class__.__name__} '
INTERNALERROR> TypeError: Object of type bytes is not JSON serializable
为啥我看视频别人读取没有报错,百度了半天找不到答案,各位大哥救命!!