------------------------…

------------------------…



-------------------------------------------------------------------------------
96 run promise.py
> self._result = self.pooled_function(*self.args, **self.kwargs)

---

666 migrate_chats __main__.py
> mod.__migrate__(old_chat, new_chat)

---

196 __migrate__ users.py
> sql.migrate_chat(old_chat_id, new_chat_id)

---

210 migrate_chat users_sql.py
> SESSION.commit()

---

163 do scoping.py
> return getattr(self.registry(), name)(*args, **kwargs)

---

1042 commit session.py
> self.transaction.commit()

---

504 commit session.py
> self._prepare_impl()

---

483 _prepare_impl session.py
> self.session.flush()

---

2536 flush session.py
> self._flush(objects)

---

2678 _flush session.py
> transaction.rollback(_capture_exception=True)

---

68 __exit__ langhelpers.py
> compat.raise_(

---

182 raise_ compat.py
> raise exception

---

2638 _flush session.py
> flush_context.execute()

---

422 execute unitofwork.py
> rec.execute(self)

---

586 execute unitofwork.py
> persistence.save_obj(

---

230 save_obj persistence.py
> _emit_update_statements(

---

994 _emit_update_statements persistence.py
> c = cached_connections[connection].execute(

---

1011 execute base.py
> return meth(self, multiparams, params)

---

298 _execute_on_connection elements.py

-------------------------------------------------------------------------------
An exception was raised while handling an update
User: 1087968824
Chat: Marie/Saitama - Sibyl module -1001691598363
Callback data: None
Message: None

Full Traceback: Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "chats_pkey"
DETAIL: Key (chat_id)=(-1001691598363) already exists.


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/ext/utils/promise.py", line 96, in run
self._result = self.pooled_function(*self.args, **self.kwargs)
File "/app/SaitamaRobot/__main__.py", line 666, in migrate_chats
mod.__migrate__(old_chat, new_chat)
File "/app/SaitamaRobot/modules/users.py", line 196, in __migrate__
sql.migrate_chat(old_chat_id, new_chat_id)
File "/app/SaitamaRobot/modules/sql/users_sql.py", line 210, in migrate_chat
SESSION.commit()
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/scoping.py", line 163, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1042, in commit
self.transaction.commit()
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 504, in commit
self._prepare_impl()
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 483, in _prepare_impl
self.session.flush()
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2536, in flush
self._flush(objects)
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2678, in _flush
transaction.rollback(_capture_exception=True)
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.raise_(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2638, in _flush
flush_context.execute()
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 586, in execute
persistence.save_obj(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 230, in save_obj
_emit_update_statements(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 994, in _emit_update_statements
c = cached_connections[connection].execute(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self._handle_dbapi_exception(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "chats_pkey"
DETAIL: Key (chat_id)=(-1001691598363) already exists.

[SQL: UPDATE chats SET chat_id=%(chat_id)s WHERE chats.chat_id = %(chats_chat_id)s]
[parameters: {'chat_id': '-1001691598363', 'chats_chat_id': '-712502510'}]
(Background on this error at: http://sqlalche.me/e/13/gkpj)

Report Page