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

ImportError: cannot import name 'ArgSpec' from 'inspect' #326

Open
2 tasks done
Abhiz2411 opened this issue May 23, 2024 · 1 comment
Open
2 tasks done

ImportError: cannot import name 'ArgSpec' from 'inspect' #326

Abhiz2411 opened this issue May 23, 2024 · 1 comment
Labels

Comments

@Abhiz2411
Copy link

Things to check first

  • I have searched the existing issues and didn't find my bug already reported there

  • I have checked that my bug is still present in the latest release

Sqlacodegen version

2.3.0.post1

SQLAlchemy version

1.4.52

RDBMS vendor

PostgreSQL

What happened?

When I ran the command sqlacodegen postgresql://postgres:secret_pass@localhost:5432/db_name > model.py It should have created code in model.py. I researched about the error and I think it is caused because codegen.py has an import statement from inspect import ArgSpec where ArgSpec is depreciated for python 3.12.2. I am using 3.12.2 version of python

Database schema for reproducing the bug

No response

@Abhiz2411 Abhiz2411 added the bug label May 23, 2024
@trembel
Copy link

trembel commented May 29, 2024

For me it is solved using the rc version. Try pip install sqlacodegen==3.0.0rc5, see here: #251

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

No branches or pull requests

2 participants