You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Telegram bot won't show the response of user creation when creating the user with it.
To Reproduce
Steps to reproduce the behavior:
Go to the telegrom bot
Click on 'create user'
Enter the requested info
select the desired protocols and click 'Done'
user will be created in the database but the bot won't show any response
Expected behavior
when creating a new user from the telegram bot, the bot should create the user in the db and show the response of the operation to the user.
Machine details (please complete the following information):
OS: Ubuntu 22.04
Python version: 3.10.6
Additional context
Logs from the error:
2023-03-17 12:06:58,142 (__init__.py:960 Thread-1 (infinity_polling)) ERROR - TeleBot: "Infinity polling exception: Parent instance <User at 0x7fb6bc33dea0> is not bound to a Session; lazy l
oad operation of attribute 'proxies' cannot proceed (Background on this error at: https://sqlalche.me/e/14/bhk3)"
2023-03-17 12:06:58,143 (__init__.py:962 Thread-1 (infinity_polling)) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 955, in infinity_polling
self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 1043, in polling
self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 1118, in __threaded_polling
raise e
File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 1074, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/util.py", line 156, in raise_exceptions
raise self.exception_info
File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/util.py", line 100, in run
task(*args, **kwargs)
File "/root/Marzban/.venv/lib/python3.10/site-packages/telebot/__init__.py", line 6395, in _run_middlewares_and_handler
result = handler['function'](message)
File "/root/Marzban/app/telegram/admin.py", line 451, in confirm_user_command
', '.join([p.type for p in db_user.proxies])
File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 482, in __get__
return self.impl.get(state, dict_)
File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 942, in get
value = self._fire_loader_callables(state, key, passive)
File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 978, in _fire_loader_callables
return self.callable_(state, passive)
File "/root/Marzban/.venv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 863, in _load_for_state
raise orm_exc.DetachedInstanceError(
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <User at 0x7fb6bc33dea0> is not bound to a Session; lazy load operation of attribute 'proxies' cannot proceed (Background on this er
ror at: https://sqlalche.me/e/14/bhk3)
The text was updated successfully, but these errors were encountered:
Describe the bug
Telegram bot won't show the response of user creation when creating the user with it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
when creating a new user from the telegram bot, the bot should create the user in the db and show the response of the operation to the user.
Machine details (please complete the following information):
Additional context
Logs from the error:
The text was updated successfully, but these errors were encountered: