Telethon TelegramClient leads to exit code -1073741819 (0xC0000005)

50 Views Asked by At

Using PyCharm 2023.2.5, Python 3.11.1 and the following code

from telethon import TelegramClient, sync, events
class telegram_messenger:
    def __init__(self):
        api_id = '123'
        api_hash = 'ABC'
        bot_token = 'ZZZ'
        client = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)

I am getting the response Process finished with exit code -1073741819 (0xC0000005). If I uncomment the line client = ..., the code runs perfectly fine. What's going on here?

0

There are 0 best solutions below