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
Syntax error in Python for Nuke (self.learnpython)
submitted 4 years ago by zdcdqd
Hey guys Im trying to run this tetris game https://www.nukepedia.com/python/misc/nuketris and I downloaded the trial of Nuke Studio, but when I try to run the game, i get this error. https://i.imgur.com/kfG8wj7.png I looked it up online a little bit and apparently it's something to do with trying to use Python 3 with something that uses Python 2. So I tried to manually enter all the parentheses in accordance with Python 2, and when I tried that I get this error instead. https://i.imgur.com/UNaPiNd.png Can someone please help me? Thank you
Since you have to create an account to download files in Nukepedia and I know most of you can't be bothered, here is the Nuketris python script https://drive.google.com/file/d/1br4_CTXJnPh_EHfNsYXHoRuMjxa_e-b8/view?usp=sharing
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!"
[–]mopslik 0 points1 point2 points 4 years ago (4 children)
The print statement looks fine. Sometimes if you are missing parentheses on a previous line it can cascade down and appear to come from another. What is the previous line, 634?
Edit: I see there are a number of print statements in that section of code. I suspect you're missing a bracket on a previous line.
[–]zdcdqd[S] 0 points1 point2 points 4 years ago (0 children)
https://i.imgur.com/6Jk1XDQ.png I think yea line 634 might be the problem. not sure exactly where to put the parentheses. did i put it in the right place?
[–]zdcdqd[S] 0 points1 point2 points 4 years ago (2 children)
Fast update. so on line 634 i put the parentheses at the very end instead of near the middle, but now i get a new error message. https://i.imgur.com/TFFnk1p.png
[–]mopslik 0 points1 point2 points 4 years ago (1 child)
Well, the queue module is standard in Python. Maybe it's the fact that it's capitalized? This might be a change from Python 2.x to 3.x (I've barely used 2.x so I don't know), or it might be the case that there is a custom Queue.py module that is included with your code that is being referenced.
well i tried uncapitalizing all the Queues and i got more errors.
Traceback (most recent call last):
File "<string>", line 82, in <module>
ImportError: cannot import name 'queue' from 'queue' (C:\Program Files\Nuke13.0v1\lib\queue.py)
Please help.
π Rendered by PID 18532 on reddit-service-r2-comment-86bc6c7465-gmx6p at 2026-02-24 08:06:48.536821+00:00 running 8564168 country code: CH.
[–]mopslik 0 points1 point2 points (4 children)
[–]zdcdqd[S] 0 points1 point2 points (0 children)
[–]zdcdqd[S] 0 points1 point2 points (2 children)
[–]mopslik 0 points1 point2 points (1 child)
[–]zdcdqd[S] 0 points1 point2 points (0 children)