Похожие чаты

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

6 просмотров

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

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

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

Quick reminder regarding the first phase of the token merger⚠️ As we approach Phase 1 of the token merger, OCEAN and AGIX will migrate to FET starting July 1st! Here's a li...
Stip11
1
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
75
Hey, Oceaners 🌊 As we approach Phase 1 of the token merger, OCEAN and AGIX will migrate to FET starting July 1st! Here's a list of exchanges that have communicated their su...
KreigDK | Never DM first🌊
3
VIP 332 Quarterly XVS Buyback, Funds Allocation and New Tokenomics Summary This VIP outlines the protocol’s Quarterly Buyback and Funds Allocation strategy as per our Tokeno...
Venus Announcements
2
База данных не поможет. Шифрование не поможет. Какие там ещё варианты? Накидывайте.
КТ315
20
А табстоп это сообщение от окна или от элемента управления?
The Bird of Hermes
18
Did you guys see the latest tweet from TonGifts? 🚀
Mike
44
I love the passion, really do. I do think this is being blown way out of proportion. We are not deleting our Telegram or not allowing you to talk about anything you want, a...
Mike Herron
3
А как лучше конвертировать физический адрес в виртуальный при маппинге? В случае ядра у меня, например, direct mapping, первые 768МБ я как есть мапплю в higher half, а остальн...
Evg Resh
26
Hey, what is the best and maintained way of transpiling cpp to c? (As a need to support many different toolchains quickly and may not have a c++ support in the given toolch...
Meitar Reihan
11
Карта сайта