module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
Opened this issue · 0 comments
RoiTang commented
基本信息
-
你使用的操作系统: windows10+pycharm
-
你使用的Python版本: 3.11
-
你加载的预训练模型:albert
核心代码
# 在snippets.py文件620行出现错误,错误信息如下:
# module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
输出信息
# module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
自我尝试
此原因为python3.7之后对于getargspec不再支持,将getargspec改为getfullargspec即可正常运行。
希望遇见这个问题的人可以这样解决。
或者有更好的解决方法请告知,谢谢。