Answers for "sqlalchemy.exc.ArgumentError: Mapper mapped class Students_of_teacher->students_of_teacher could not assemble any primary key columns for mapped table 'students_of_teacher'"

0

sqlalchemy.exc.ArgumentError: Mapper mapped class Students_of_teacher->students_of_teacher could not assemble any primary key columns for mapped table 'students_of_teacher'

Hi,
As the exception message says, sqlalchemy "could not assemble any primary key columns for mapped table 'users'". The sqlalchemy orm needs a primary key for each mapped table.
See https://docs.sqlalchemy.org/en/14/core/metadata.html#sqlalchemy.schema.Column.params.primary_key for how to set a primary key on a column
Posted by: Guest on August-21-2021

Code answers related to "sqlalchemy.exc.ArgumentError: Mapper mapped class Students_of_teacher->students_of_teacher could not assemble any primary key columns for mapped table 'students_of_teacher'"

Browse Popular Code Answers by Language