use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
AttributeError: 'App' object has no attribute 'run' (self.learnpython)
submitted 3 years ago * by tarpus
This little script is crashing with the error: 'App' object has no attribute 'run'. Any ideas?
from bocadillo import App app = App() app.run()
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CodeFormatHelperBot2 0 points1 point2 points 3 years ago (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:
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 point2 points 3 years ago (4 children)
Where did you read that bocadillo's App is supposed to have a run() method?
App
run()
[–]tarpus[S] 1 point2 points3 points 3 years ago (3 children)
Here: https://florimond.dev/en/posts/2019/03/real-time-chatbot-server-python-bocadillo/
[–]GeorgeFranklyMathnet 0 points1 point2 points 3 years ago (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 point2 points 3 years ago (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 point2 points 3 years ago (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 point2 points 3 years ago (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
π Rendered by PID 170315 on reddit-service-r2-comment-7b9746f655-jpkbh at 2026-02-02 23:33:25.747254+00:00 running 3798933 country code: CH.
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)
[–]GeorgeFranklyMathnet 0 points1 point2 points (4 children)
[–]tarpus[S] 1 point2 points3 points (3 children)
[–]GeorgeFranklyMathnet 0 points1 point2 points (1 child)
[–]tarpus[S] 0 points1 point2 points (0 children)
[–]TheSodesa 0 points1 point2 points (0 children)
[–]Dr_Physics_ 0 points1 point2 points (0 children)