Telethon TelegramClient 导致退出代码 -1073741819 (0xC0000005)

问题描述 投票:0回答:1

使用 PyCharm 2023.2.5、Python 3.11.1 和以下代码

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)

我收到回复了

Process finished with exit code -1073741819 (0xC0000005)
。如果我取消注释行
client = ...
,代码运行得很好。这是怎么回事?

python-3.x telethon error-code
1个回答
0
投票

正如用户 Lonami 在评论中指出的那样,我的 Python 版本似乎存在缺陷。重新安装(和升级)Python 和 Telethon 解决了这个问题。谢谢你,洛娜米!

© www.soinside.com 2019 - 2024. All rights reserved.