Closed icepaule closed 2 years ago
hm, this looks like a bug in the Telethon library, something to do with the takeout mode. Can you try setting use_takeout
to False
in the config file?
Doesn't change the result. - Same error.
Following your suggestion, I've reinstalled telethon itself from git.
Now, the error changes:
tg-archive --sync --config ./config.yaml
2022-07-21 07:46:42,395: cryptg detected, it will be used for encryption
Traceback (most recent call last):
File "/usr/local/bin/tg-archive", line 33, in
So, I'm digging deeper for the "sync" module. :-)
When you reinstalled, did you delete data.sqlite
and the session file too? If not, should delete both and retry with takeout disabled.
Hello, could someone please help me with his issue. Doing a fresh install but getting below error:
Thanks so much for your help and the great tool. Marcus
root@xxx# tg-archive --sync 2022-07-20 18:29:51,555: cryptg detected, it will be used for encryption 2022-07-20 18:29:51,952: starting Telegram sync (batch_size=2000, limit=100, wait=5, mode=standard) Traceback (most recent call last): File "/usr/local/bin/tg-archive", line 33, in
sys.exit(load_entry_point('tg-archive==0.5.5', 'console_scripts', 'tg-archive')())
File "/usr/local/lib/python3.10/dist-packages/tg_archive-0.5.5-py3.10.egg/tgarchive/init.py", line 140, in main
s = Sync(cfg, args.session, DB(args.data))
File "/usr/local/lib/python3.10/dist-packages/tg_archive-0.5.5-py3.10.egg/tgarchive/sync.py", line 29, in init
self.client = self.new_client(session_file, config)
File "/usr/local/lib/python3.10/dist-packages/tg_archive-0.5.5-py3.10.egg/tgarchive/sync.py", line 102, in new_client
client = TelegramClient(session, config["api_id"], config["api_hash"])
File "/usr/local/lib/python3.10/dist-packages/Telethon-1.24.0-py3.10.egg/telethon/client/telegrambaseclient.py", line 273, in init
session = SQLiteSession(session)
File "/usr/local/lib/python3.10/dist-packages/Telethon-1.24.0-py3.10.egg/telethon/sessions/sqlite.py", line 55, in init
self._upgrade_database(old=version)
File "/usr/local/lib/python3.10/dist-packages/Telethon-1.24.0-py3.10.egg/telethon/sessions/sqlite.py", line 147, in _upgrade_database
c.execute("alter table sessions add column takeout_id integer")
sqlite3.OperationalError: duplicate column name: takeout_id