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
The application tries to use credentials to access the database that have already expired, causing the thread to crash.
Error message:
[2024-10-13 08:51:46,186] ERROR [logger.logger:handle:29] [Bot]: Error: permission denied for table users
Exception in thread WorkerThread1:
Traceback (most recent call last):
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/util.py", line 93, in run
task(*args, **kwargs)
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/__init__.py", line 8945, in _run_middlewares_and_handler
result = handler['function'](message)
File "/home/pyinstabot-downloader/app/src/bot.py", line 127, in bot_callback_query_handler
if users.user_access_check(**requestor).get('permissions', None) == users.user_status_allow:
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/users/users.py", line 207, in user_access_check
self.storage.register_user(
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/users/storage.py", line 80, in register_user
self.cursor.execute(f"INSERT INTO users (user_id, chat_id, status) VALUES ('{user_id}', '{chat_id}', '{status}')")
psycopg2.errors.InsufficientPrivilege: permission denied for table users
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/util.py", line 103, in run
self.exception_callback(self, self.exception_info)
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/util.py", line 140, in on_exception
handled = self.telebot.exception_handler.handle(exc_info)
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telegram/telegram.py", line 30, in handle
raise FailedToCreateInstance("Failed to create the bot instance.") from exception
telegram.exceptions.FailedToCreateInstance: Failed to create the bot instance.
Additional context
This will probably be fixed in users-package (because that module generates the credentials itself).
Possible correction
Intercept error during psql role revocation (regeneration of credentials via vault database engine) and retrieve actual authentication data.
Or consider other ways to prevent the application from encountering this error.
Screenshots
None
Check list after fixing the bug
None
The text was updated successfully, but these errors were encountered:
)
## v3.1.0 - 2024-10-23
### What's Changed
**Full Changelog**: v3.0.0...v3.1.0 by @obervinov in #111
#### 🚀 Features
* bump workflows to `2.0.2`
* bump dependencies versions
#### 💥 Breaking Changes
* bump python version to `3.12`
#### 🐛 Bug Fixes
* other general bug fixes and improvements
* fix not enough condition for `igtv` type of content for `Downloader` class
* fix infinite loop in the `Downloader` class when type of content not supported in condition
* #104
* #105
Describe the bug
The application tries to use credentials to access the database that have already expired, causing the thread to crash.
Error message:
Additional context
This will probably be fixed in users-package (because that module generates the credentials itself).
Possible correction
Intercept error during psql role revocation (regeneration of credentials via vault database engine) and retrieve actual authentication data.
Or consider other ways to prevent the application from encountering this error.
Screenshots
None
Check list after fixing the bug
None
The text was updated successfully, but these errors were encountered: