partially initialized module 'gradio' has no attribute 'inputs'
时间: 2023-08-04 08:04:21 浏览: 303
引用\[1\]:AttributeError: partially initialized module XXX has no attribute ‘XXX’ (most likely due to a circular import) 。 引用\[2\]:AttributeError: partially initialized module 'jieba' has no attribute 'cut' (most likely due to a circular import) 。 引用\[3\]:遇到这个问题时真是被自己傻哭了,就是文件名和库名一致了,将文件名换一个名字就可以了 Traceback (most recent call last): File "S:/Study/picture processing/mt/NaturalLanguageProcession/jieba.py", line 2, in <module> import jieba File "S:\Study\picture processing\mt\NaturalLanguageProcession\jieba.py", line 5, in <module> seg_list=jieba.cut("我喜欢吃酸菜鱼",cut_all=True) AttributeError: partially initialized module 'jieba' has no attribute 'cut' (most likely due to a circular import) 。
问题: partially initialized module 'gradio' has no attribute 'inputs'
回答: 这个错误通常是由于循环导入(circular import)引起的。循环导入是指两个或多个模块相互导入,导致无法正确加载模块的属性。在你提供的引用中,出现了类似的错误,比如'jieba'模块没有'cut'属性,这很可能是由于循环导入导致的。解决这个问题的方法是检查你的代码,确保没有循环导入的情况发生。此外,还要注意文件名和库名是否一致,避免出现类似的错误。
#### 引用[.reference_title]
- *1* [AttributeError: partially initialized module xxx has no attribute ‘XXX](https://blog.csdn.net/Seraph09/article/details/131324673)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [AttributeError: partially initialized module ‘jieba‘ has no attribute ‘cut‘ (most likely due to ...](https://blog.csdn.net/qq_46906413/article/details/122651363)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文