I'm having trouble running an "Always-on tasks" process with a Python script that starts a bot using the Telethon library. To execute the script, I'm using the following command:
source virtualenvwrapper.sh && workon myvirtualenv && chmod 777 /home/massimocascone/WellnessCommunitybot/script.py && python3.10 /home/massimocascone/WellnessCommunitybot/script.py
However, when I run it, I receive an error message that reads:
Mar 17 19:47:51 Traceback (most recent call last):
Mar 17 19:47:51 File "/home/massimocascone/WellnessCommunitybot/script.py", line 11, in <module>
Mar 17 19:47:51 client = TelegramClient(config.session_name_bot, config.API_ID, config.API_HASH).start(bot_token=config.BOT_TOKEN)
Mar 17 19:47:51 File "/home/massimocascone/.virtualenvs/myvirtualenv/lib/python3.10/site-packages/telethon/client/telegrambaseclient.py", line 275, in __init__
Mar 17 19:47:51 session = SQLiteSession(session)
Mar 17 19:47:51 File "/home/massimocascone/.virtualenvs/myvirtualenv/lib/python3.10/site-packages/telethon/sessions/sqlite.py", line 47, in __init__
Mar 17 19:47:51 c = self._cursor()
Mar 17 19:47:51 File "/home/massimocascone/.virtualenvs/myvirtualenv/lib/python3.10/site-packages/telethon/sessions/sqlite.py", line 242, in _cursor
Mar 17 19:47:51 self._conn = sqlite3.connect(self.filename,
Mar 17 19:47:51 sqlite3.OperationalError: unable to open database file
Can someone assist me with resolving this issue?