Computer Vision || Machine Learning || K8's || Prometheus || KNative || GraphQL || Hi Everyone!! I am Ritesh a 2nd year CSE UG Currently a Kaggle 3X Expert and a DevOps Enthusiast!!
Hello @lordghostx
it was a very nice blog!! I am following all the steps of setting up the bot but I confuse in creating a FaunaDb database collection!! please right me if I am wrong
We need to create one collection of name users and then the index with that users
We need to create new collection name todo and the index with that todo with terms as data.user_id
Computer Vision || Machine Learning || K8's || Prometheus || KNative || GraphQL || Hi Everyone!! I am Ritesh a 2nd year CSE UG Currently a Kaggle 3X Expert and a DevOps Enthusiast!!
Ok @lordghostx
, so I have created two collections one for users and another for todo, and also created their respective index,
and in the todo index, I have added data.user_id in terms Is it right? because it is giving me connection aborted error when I execute [/add_todo] cmd and rest all cmd are working fine.
Please correct me if it is wrong I think I am wrongly create database :(
Computer Vision || Machine Learning || K8's || Prometheus || KNative || GraphQL || Hi Everyone!! I am Ritesh a 2nd year CSE UG Currently a Kaggle 3X Expert and a DevOps Enthusiast!!
@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'))
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
Hello @lordghostx it was a very nice blog!! I am following all the steps of setting up the bot but I confuse in creating a FaunaDb database collection!! please right me if I am wrong
please right me if I am wrong!!
Ok @lordghostx , so I have created two collections one for users and another for todo, and also created their respective index,
and in the todo index, I have added data.user_id in terms Is it right? because it is giving me connection aborted error when I execute [/add_todo] cmd and rest all cmd are working fine.
Please correct me if it is wrong I think I am wrongly create database :(
Hi, I had to clone the repository and setup Fauna all over but I was unable to recreate your error.
I want to ask, when you were creating the first index did you set the name of the index to
users
and it's terms toid
as shown here@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:
Collections
Indexs
Code is the same as you have in your git repo!!
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. ThanksYes you're right, our app has 2 collections which are "users" and "todo"
The users collection stores information about our user such as their chat_id and username while the todo collection stores tasks created by users.
In Fauna, we need to create different collections and an index for each that's why we have different ones.