I’m struggling with peewee in python. My configuration for project is Python + pyTelegramBotAPI + Sqlite3 + peewee. My telegram bot is the task manager (learning project). Here’s my code for getting avaliable tasks:
def get_most_recent_tasks(page: int) -> list:
offset = (3 * page) - 3
query = TaskModel.select().order_by(TaskModel.creation_date.desc()).limit(3).offset(offset)
most_recent_tasks = query.execute()
print(most_recent_tasks)
Here’s the error that I get:
most_recent_tasks = query.execute()
^^^^^^^^^^^^^^^
peewee.OperationalError: no such table: Tasks
Any help appreciated.
1