【解决python报错】AttributeError: ‘Figure‘ object has no attribute ‘getvalue’
报错详情代码:博主在运行中介效应生成路径图的时候,出现了如下报错:AttributeError:'Figure'objecthasnoattribute'getvalue'定位到出现错误的代码位置,发现是在绘制plot图时出现了错误(Image(path.getvalue())):path=sm.graphics.plot_partregress('Y','X1',['Z'],data=df,ob