SQLAlchemy – errors

Description of some errors and their solution in SQLAlchemy.

could not assemble any primary key columns for mapped table

sqlalchemy.exc.ArgumentError: Mapper mapped class UserSetting-> user_settings could not assemble any primary key columns for mapped table ‘user_settings’

For SQLAlchemy to work, each table must have a primary key. Add our tables to the models primary_key = True

Similar Posts

Leave a Reply Cancel reply