sqlacodegen error - AttributeError: 'Table' object has no attribute 'bind' #257
Unanswered
yoavkopfstein
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi! Have you resolved this? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using sqlacodegen for the first time to generate Python class models from an existing PostgreSQL database.
when running this :
% sqlacodegen --schema=<schema_name> --tables <table_name> postgresql://:@
I am getting this error:
Traceback (most recent call last):
File "/bin/sqlacodegen", line 8, in
sys.exit(main())
File "/lib/python3.9/site-packages/sqlacodegen/main.py", line 51, in main
generator = CodeGenerator(metadata, args.noindexes, args.noconstraints, args.nojoined,
File "/lib/python3.9/site-packages/sqlacodegen/codegen.py", line 437, in init
model = self.class_model(table, links[table.name], self.inflect_engine,
File "/lib/python3.9/site-packages/sqlacodegen/codegen.py", line 201, in init
super(ModelClass, self).init(table)
File "***/lib/python3.9/site-packages/sqlacodegen/codegen.py", line 100, in init
column.type = self._get_adapted_type(column.type, column.table.bind)
AttributeError: 'Table' object has no attribute 'bind'
Can you please advise?
Beta Was this translation helpful? Give feedback.
All reactions