DEV Community

loading...

Discussion on: Building a Telegram Bot with Python and Fauna

darkart108 profile image
Ritesh Yadav • Edited

@lordghostx I am uploading the images of both collection and index please take a look and correct it if it is wrong!!

The cmd /start and /list_todo are working fine.

Problem is with /add_todo

The error I am getting:

File "bot.py", line 42, in add_todo
    user = client.query(q.get(q.match(q.index("users"), chat_id)))
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Enter fullscreen mode Exit fullscreen mode

Collections
Alt

Indexs
Alt

Alt

Code is the same as you have in your git repo!!

Thread Thread
lordghostx profile image
LordGhostX Author

Hi,

From the look of things I can see the error occurs when you are trying to fetch the current user saved in your database and it seems the Fauna API is not giving you a response.

You're setting up the database well and the code runs fine. Can you delete and create a new Fauna API key then try running the code again, also don't forget a user account needs to be created first using /start if you haven't done that already. If the problem persists send me a message on Twitter so we don't fill up the comment section with back and forth messages. Thanks