During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/parakt/.local/lib/python3.8/site-packages/telethon/client/updates.py", line 467, in _dispatch_update
await callback(event)
File "/home/parakt/penwin7/penwin/business/mailman.py", line 261, in handlerMessage
await task
File "/home/parakt/penwin7/penwin/business/mailman.py", line 32, in filter_signal
await update_signal(inc_chat_id, chat_conf, message, event)
File "/home/parakt/penwin7/penwin/business/mailman.py", line 60, in update_signal
return
File "/home/parakt/.local/lib/python3.8/site-packages/peewee.py", line 4158, in exit
return self._helper.__exit__(exc_type, exc_val, exc_tb)
File "/home/parakt/.local/lib/python3.8/site-packages/peewee.py", line 4227, in exit
self.rollback()
File "/home/parakt/.local/lib/python3.8/site-packages/peewee.py", line 4214, in rollback
self.db.execute_sql('ROLLBACK TO SAVEPOINT %s;' % self.quoted_sid)
File "/home/parakt/.local/lib/python3.8/site-packages/peewee.py", line 3136, in execute_sql
self.commit()
File "/home/parakt/.local/lib/python3.8/site-packages/peewee.py", line 2902, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/home/parakt/.local/lib/python3.8/site-packages/peewee.py", line 185, in reraise
raise value.with_traceback(tb)
File "/home/parakt/.local/lib/python3.8/site-packages/peewee.py", line 3129, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: no such savepoint: s0981e1ec26f44688bcc610a16b201030
Guys I'm just getting started with peewee in general and I have a question. According to the documentation, I need to specify the database connection in the "Meta" method inside my model. But the thing is, I want to put my models in a separate python file and import it from other files in my code. I'm not sure if this will work correctly, since when you import (I think so), all variables and data are reinitialized. How can I format my code correctly?
I didn't really understand your answer. Does it look like this?
https://charlesleifer.com/blog/structuring-flask-apps-a-how-to-for-those-coming-from-django/