Похожие чаты

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 ответов

11 просмотров

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

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

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

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта