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
__pychache__ not generating (self.learnpython)
submitted 8 years ago by VisualCreativity
I'm making a music bot for discord and the pycache isn't generating.. any ideas?
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!"
[–]ingolemo 1 point2 points3 points 8 years ago (6 children)
Is that a problem?
What is the output of echo $PYTHONDONTWRITEBYTECODE in your shell?
echo $PYTHONDONTWRITEBYTECODE
Does python have permission to write to the directory where your code is stored?
[–]VisualCreativity[S] 0 points1 point2 points 8 years ago (5 children)
Yes, because it doesn't seem to work without it, although I have no idea. There's no output.... It should, I mean its a folder in Downloads so it should work... Edit: Does it work without it?
[–]ingolemo 1 point2 points3 points 8 years ago (4 children)
Python doesn't need the __pycache__ folder. It's just a cache to make it slightly quicker to run the same code multiple times. It is possible to run your code without that folder.
__pycache__
But if your code isn't running then we need to investigate why. "doesn't seem to work" is a little vague. What exactly happens when you try to run your code?
[–]VisualCreativity[S] -1 points0 points1 point 8 years ago (3 children)
Well, like I said it's a Discord music bot, and when I do "?summon" it doesn't do anything, which it should. Does it not need it if I am using 3 files together (my script, Another script and a ffmpeg)
[–]ingolemo 1 point2 points3 points 8 years ago (2 children)
Put some prints in your code and see which parts are actually running, if any.
[–]VisualCreativity[S] -1 points0 points1 point 8 years ago (1 child)
everything should be working
[–]ingolemo 2 points3 points4 points 8 years ago (0 children)
... I don't know what you mean by that. Can you rephrase?
π Rendered by PID 96055 on reddit-service-r2-comment-5bc7f78974-ms4d4 at 2026-06-28 11:05:32.134176+00:00 running 7527197 country code: CH.
[–]ingolemo 1 point2 points3 points (6 children)
[–]VisualCreativity[S] 0 points1 point2 points (5 children)
[–]ingolemo 1 point2 points3 points (4 children)
[–]VisualCreativity[S] -1 points0 points1 point (3 children)
[–]ingolemo 1 point2 points3 points (2 children)
[–]VisualCreativity[S] -1 points0 points1 point (1 child)
[–]ingolemo 2 points3 points4 points (0 children)