Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'? #513

Open
RoiTang opened this issue Apr 6, 2023 · 0 comments
Open

Comments

@RoiTang
Copy link

RoiTang commented Apr 6, 2023

基本信息

  • 你使用的操作系统: 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即可正常运行。
希望遇见这个问题的人可以这样解决。
或者有更好的解决方法请告知,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant