Похожие чаты

Is there any known reasons, as to why my telethon

script stops after like half a minute? Happens only on VPS. After it stopped, I can type anything in the console and it doesn't react in any way, the only way to fix it is ^C. Other programs seem to work fine

7 ответов

10 просмотров

Depends on your code, make sure you don't block the main

Artemii-Kravchuk Автор вопроса

here is my code: from telethon import TelegramClient, events api_id = ..... api_hash = "....." client = TelegramClient('session', api_id, api_hash) @client.on(events.NewMessage) async def my_event_handler(event): await client.forward_messages(....., event.message) client.start() client.run_until_disconnected()

Artemii Kravchuk
here is my code: from telethon import TelegramCli...

set logging to info or debug and try https://t.me/TelethonChat/546069

Artemii-Kravchuk Автор вопроса
⎞ .·. ⎝ ⎝
set logging to info or debug and try https://t.me...

I get AuthKeyUnregisteredError... Something wrong with .session file probably, it asks me to log in every time I've once seen somewhere that on VPS session file should be in some different place, is this true? Can't find that site now((

Your system may be deleting the session files, but using start() it should ask you to login again when do you see AuthKeyUnregistered, as a buffer error or GetDifference? if you don't use connect() it shouldn't show

Artemii-Kravchuk Автор вопроса
⎞ .·. ⎝ ⎝
Your system may be deleting the session files, but...

After I set logging level to info, I'm testing the code with some messages. It works, but stops after some time - sent screenshot from console (telegram didn't allow to send compressed, so it's a file...) and .session file is there, doesn't get deleted

Artemii Kravchuk
After I set logging level to info, I'm testing the...

once the client is started(), the authKey is loaded to memory and system can't mess with it, and if session is not authorized. it should be asking you for phone and code again (unless it's a bot and you pass token) so it's not possible for it de-authorize while running, unless the server returns a preceeding error, probably the session being terminated

Похожие вопросы

Обсуждают сегодня

Всем привет! Имеется функция: function IsValidChar(ch: UTF8Char): Boolean; var i: Integer; ValidChars: AnsiString; begin ValidChars := 'abcdefghijklmnopqrstuvwxyzABCDE...
Евгений
44
For all those that keep asking why no pump? why this ? and why that...? Please close ur ewt chart and open 2 others - TOTAL (total mc) and BTC.D (btc dominance). Maybe BTC a...
Inn3r_G
19
"Since pnut can flip FTM easily, I'm swapping my FTM to pnut and hoping for a easy x5-x10" Perfect recipe for disaster. NFA but chances are, you'll end up as exit liquidity ...
C. A.
7
AMD status update? No longer in the plan but something might be around the corner later on Chinese partner? No longer in the plan. This market does not seem to be the top ...
Ben
6
Добрый день, подскажите, пожалуйста, по проблеме. Сегодня на работе утром обнаружилось что по рдп подключиться не получается к серверу 2022. В серверную зашел - на системно...
srv
19
Чтобы перехватить все нажимания буков на форме, надо хук ставить? Пробовал на форме ОнКейДаун, оно ловит клаву если фокус не на компоненте с вводом текста
Serjone
15
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
лучше скажите, причём тут паскаль?
Alexey Kulakov
36
Hey Why do I need headers files in c++ code when creating non library program? does it possible to import namespace without headers?
Jacob
12
Всем привет! вывожу на общей стр дочерние ресурсыв каждом ресурсе галерея, и первая фотка должна выводиться на общей [!DocLister? &prepare=photo !]
Alekso
12
Карта сайта