特牛生活网

【Python 脚本报错】AttributeError:'module' has no attribute 'xxx'的解决方法_attributeerror: module 'gradio' has no attribute '-CSDN博客

网友收藏
文章浏览阅读10w+次,点赞64次,收藏116次。最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本正常的,但执行报错”AttributeError: ‘module’ object has no attribute ‘xxx’”,其实是.pyc文件存在问题。问题定位:查看import库的源文件,发现源文件存在且没有错误,同时存在源文件的.pyc文件。问题解决方法:删除该库的.pyc文件,重新运行代码;或者找一个可以运..._attributeerror: module 'gradio' has no attribute 'themes