[Solved] Why can't I import queue - No module named queue

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
KingmakerVN
Regular
Posts: 37
Joined: Sat Nov 23, 2019 7:03 pm
Projects: Kingmaker
Contact:

[Solved] Why can't I import queue - No module named queue

#1 Post by KingmakerVN »

I know this is probably a dumb question, but I don't seem to be able to import queue. Does it have anything to do with "queue" going orange when you write it? Or does it have something to do with the python version? I don't have a problem importing other stuff.
Last edited by KingmakerVN on Sun Sep 26, 2021 6:11 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Why can't I import queue - No module named queue

#2 Post by PyTom »

Are you on Ren'Py 7.4?

Ren'Py is using Python 2.7, in which the module was named Queue. However, 7.4 has some Python 3 compatibility features, so queue should be available under that name.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

KingmakerVN
Regular
Posts: 37
Joined: Sat Nov 23, 2019 7:03 pm
Projects: Kingmaker
Contact:

Re: Why can't I import queue - No module named queue

#3 Post by KingmakerVN »

PyTom wrote: Sun Sep 26, 2021 6:02 pm Are you on Ren'Py 7.4?

Ren'Py is using Python 2.7, in which the module was named Queue. However, 7.4 has some Python 3 compatibility features, so queue should be available under that name.
How nice. Thank you for the quick response!

Post Reply

Who is online

Users browsing this forum: No registered users