Open ghost opened 2 years ago
I've even tried to create a new Anaconda environment with Python 3.6 and done pip install -r requirements.txt
but it seems that the problem still happens:
File "/home/ubuntu/anaconda3/envs/XXXXX/lib/python3.6/site-packages/telegram/update.py", line 219, in de_json
return cls(**data)
TypeError: __init__() missing 1 required positional argument: 'update_id'
p/s: I tried to run on both OSes: Windows 11 (my PC at home) and Linux (the company PC)
Not sure how to fix this bug. However, I've found that: when I tried to call /getUpdates from the api.telegram.org, it said:
{"ok":false,"error_code":409,"description":"Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first"}
Therefore, I understood my problem - missing the 'update_id' (since the telegram bot couldn't retrieve the getUpdates
info successfully). I think the webhook
shouldn't be actived before the getUpdates
method is called. How can I fix this?
Greeting, thank you for your wonderful work! Currently, I'm writing a telegram bot using flask and webhook for my company.
I found your bot and it's easy to understand. However, when I try to run and test the POST method (with Postman), I received:
I'm using Python 3.8 and python-telegram-bot 13.9