Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot is not replying #4

Open
ghost opened this issue Jun 7, 2020 · 5 comments
Open

Bot is not replying #4

ghost opened this issue Jun 7, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 7, 2020

Hello bro,
I watched the tutorial and write the ditto code, even copied yours, but the bot is able to read the messages but not able to reply. Kindly help

@Klimmbimmel
Copy link

Klimmbimmel commented Jul 17, 2020

Please be more precise with your question. What did you do? What part of the code did you change?

@helenmar
Copy link

I watched the video and used the code exactly, I didn't change anything. When I ran the server.py code I got an error
...
Traceback (most recent call last):
File "server.py", line 15, in
updates = updates["result"]
TypeError: 'NoneType' object is not subscriptable
i delete my file tree from the file part

@tuyyui
Copy link

tuyyui commented Nov 20, 2020

I watched the video and used the code exactly, I didn't change anything. When I ran the server.py code I got an error
...
Traceback (most recent call last):
File "server.py", line 15, in
updates = updates["result"]
TypeError: 'NoneType' object is not subscriptable
i delete my file tree from the file part

I'm getting this same error anyone knows why?

@tuyyui
Copy link

tuyyui commented Dec 1, 2020

It wasn't the authorization token it was an error within my PyCharm setting. Please make sure you have a cfg extension installed so your PyCharm IDE will read the file.

@Klimmbimmel
Copy link

Following the error, this could also be related to a broken telegram response. Updates will look very empty in case of server errors. It can be empty, updates["ok"] can be False. (I have never seen ok or result not being in updates, although i check for those errors.)

Also, one user deleted their reply, but it was correct also. The line 24 in server.py

from_ = item["message"]["from"]["id"]

can break also, as ["message"]["from"] is optional. (It might be empty in redirected messages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants