0

I use telethon TelegramClient that should store data in SQLite .session file
client = TelegramClient('session', API_ID, API_HASH)

In windows, everything works perfectly, but in Linux ubuntu (22.04) virtual machine, I got "userwarning: the sqlite3 module is not available under this python installation and no custom session instance was given; using memorysession"

I use the same python version (3.11.0) and identical versions of modules and libraries (including telethon), so I don't know what causes this problem

I don't wanna use memorysession because, in this case, I have to enter the phone number and code every time, and I don't want to use stringSession I know that I could use a custom session like PostgreSQL for data storage, but I would appreciate it if you help me to find a way to use SQLite

I expect .session file to be created (or used if it is aleady in directory), but memorysession is used instead.

Alexandra
  • 36
  • 3
  • Your Python installation seems to be broken. This is likely a duplicate of [No module named _sqlite3](https://stackoverflow.com/q/1210664/4759433) or similar questions. Make sure that Python was installed correctly and that SQLite 3 is available in your system. – Lonami Apr 04 '23 at 16:55

0 Answers0