Forums

sqlite3.OperationalError: unable to open database file

Traceback (most recent call last): File "/home/sandroros/test/main.py", line 150, in <module> app1.start() File "/home/sandroros/.local/lib/python3.10/site-packages/pyrogram/sync.py", line 66, in async_to_sync_wrap return loop.run_until_complete(coroutine) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/home/sandroros/.local/lib/python3.10/site-packages/pyrogram/methods/utilities/start.py", line 58, in start is_authorized = await self.connect() File "/home/sandroros/.local/lib/python3.10/site-packages/pyrogram/methods/auth/connect.py", line 40, in connect await self.load_session() File "/home/sandroros/.local/lib/python3.10/site-packages/pyrogram/client.py", line 616, in load_session await self.storage.open() File "/home/sandroros/.local/lib/python3.10/site-packages/pyrogram/storage/file_storage.py", line 58, in open self.conn = sqlite3.connect(str(path), timeout=1, check_same_thread=False) sqlite3.OperationalError: unable to open database file

Make sure that the path to he database file in the code matches the reality.

I don't have databases in the code

Yes, you do. It looks like pyrogram is trying to open a database. You will need to check the pyrogram documentation to see what it needs. Perhaps you need to specify that in some configuration file or something.

The problem is that pyrogram library works just fine on everyone's machine but is not working properly on your consoles.

Only paid customers can complain on this as free users can't even install this library.

It doesn't require any configuration on local machine. It create two session files. and access it.

We need more details about how it fails for you.