Traceback (most recent call last): File "/root/NotPixel/main.py", line 19, in <module> client = TelegramClient("NotPx_Auto",api_id,api_hash).start() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/client/auth.py", line 128, in start else self.loop.run_until_complete(coro) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/client/auth.py", line 135, in _start await self.connect() File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/client/telegrambaseclient.py", line 558, in connect self.session.auth_key = self._sender.auth_key ^^^^^^^^^^^^^^^^^^^^^ File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/sessions/sqlite.py", line 180, in auth_key self._update_session_table() File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/sessions/sqlite.py", line 194, in _update_session_table c.execute('delete from sessions') sqlite3.OperationalError: database is locked Task was destroyed but it is pending! task: <Task pending name='Task-5' coro=<MTProtoSender._send_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/mtprotosender.py:464> wait_for=<Future pending cb=[Task.task_wakeup()]>> Task was destroyed but it is pending! task: <Task pending name='Task-6' coro=<MTProtoSender._recv_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/mtprotosender.py:507> wait_for=<Future pending cb=[Task.task_wakeup()]>> Task was destroyed but it is pending! task: <Task pending name='Task-3' coro=<Connection._send_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/connection/connection.py:316> wait_for=<Future pending cb=[Task.task_wakeup()]>> Task was destroyed but it is pending! task: <Task pending name='Task-4' coro=<Connection._recv_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/connection/connection.py:335> wait_for=<Future pending cb=[Task.task_wakeup()]>> Exception ignored in: <coroutine object Connection._recv_loop at 0x7f9e950689a0> RuntimeError: coroutine ignored GeneratorExit
Every time the script is stopped it is necessary to recreate the session to be able to run it again
Traceback (most recent call last): File "/root/NotPixel/main.py", line 19, in <module> client = TelegramClient("NotPx_Auto",api_id,api_hash).start() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/client/auth.py", line 128, in start else self.loop.run_until_complete(coro) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/client/auth.py", line 135, in _start await self.connect() File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/client/telegrambaseclient.py", line 558, in connect self.session.auth_key = self._sender.auth_key ^^^^^^^^^^^^^^^^^^^^^ File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/sessions/sqlite.py", line 180, in auth_key self._update_session_table() File "/root/tomatobot/myenv/lib/python3.11/site-packages/telethon/sessions/sqlite.py", line 194, in _update_session_table c.execute('delete from sessions') sqlite3.OperationalError: database is locked Task was destroyed but it is pending! task: <Task pending name='Task-5' coro=<MTProtoSender._send_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/mtprotosender.py:464> wait_for=<Future pending cb=[Task.task_wakeup()]>> Task was destroyed but it is pending! task: <Task pending name='Task-6' coro=<MTProtoSender._recv_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/mtprotosender.py:507> wait_for=<Future pending cb=[Task.task_wakeup()]>> Task was destroyed but it is pending! task: <Task pending name='Task-3' coro=<Connection._send_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/connection/connection.py:316> wait_for=<Future pending cb=[Task.task_wakeup()]>> Task was destroyed but it is pending! task: <Task pending name='Task-4' coro=<Connection._recv_loop() running at /root/tomatobot/myenv/lib/python3.11/site-packages/telethon/network/connection/connection.py:335> wait_for=<Future pending cb=[Task.task_wakeup()]>> Exception ignored in: <coroutine object Connection._recv_loop at 0x7f9e950689a0> RuntimeError: coroutine ignored GeneratorExit
Every time the script is stopped it is necessary to recreate the session to be able to run it again