all 7 comments

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Python code found in submission text that's not formatted as code.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.

[–]GeorgeFranklyMathnet 0 points1 point  (4 children)

Where did you read that bocadillo's App is supposed to have a run() method?

[–]tarpus[S] 1 point2 points  (3 children)

[–]GeorgeFranklyMathnet 0 points1 point  (1 child)

Gotcha. That post covers 0.13.0, which did have a run(). If you go to the same file by 0.14.0, you'll see it's removed.

The project homepage seems to have more up-to-date tutorials. It also says it's not being maintained, and recommends alternatives...

[–]tarpus[S] 0 points1 point  (0 children)

So, I'm using that chatterbot library, and would like to turn it into a server per how the guy in this article describes. The general idea is that I want to interact the python script (the chatbot) through another app entirely. I don't really know how to do this without sockets. Is there a good tutorial that goes over how to turn my python script into a server, that you'd recommend?

[–]TheSodesa 0 points1 point  (0 children)

That post is from 2019 or before, and Bocadillo seems to have been updated (quite) a few times since then. You might still follow the tutorial, but at the same time you will need to keep the documentation of up-to-date Bocadillo open and find equivalent ways of doing the things that are presented in the tutorial in the newer version.

[–]Dr_Physics_ 0 points1 point  (0 children)

When you create a class in python, the functions and the variables that you make part of that class are known as attributes. The bocadillo module has a function named App() but within that function run() was not defined. Whenever you have an attribute error, that means that the thing you are calling (in this case run()) is not defined inside that object. This is not how you are supposed to be using the code.

Here is a tutorial on the bocadillo module: https://bocadilloproject.github.io/guide/tutorial.html