#๐ python game crashing
104 messages ยท Page 1 of 1 (latest)
@broken python
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
hey, ๐ my game that I am working on is an asci art style game run in the terminal. When I run my code which is just a save load system, and a way to navigate the terminal game, it works fine, but only on visual studio. However when I go into my filesystem and open my game main.py it works up untill I make a new game and set my name then it crashes. I'm not sure why it does not work as well on windows command prompt as visual studio or windows PowerShell, but when I run it on visual studio and windows PowerShell it works fine but on cmd prompt it does not work and crashes. my code is
whats the error message?
How did you run it? Typed a command in your terminal or double-clicking the file?
double clicking the file because I want to test the user experience
Try via command
it wont work
py <yourfilename>.py
Saying "won't work" is not helpful to anyone. What are you seeing?
ik how to do it and I have it has the same issue it just closes BUT when I run it through PowerShell it works fine
it's probably not wise to have a while loop inside a while loop (while run, while menu and while play)
here is a demenstration
and I am new to python and this is me following a tutorial
alright @fair totem here
shooot
woops its just visual studio
let me record seprete for each
I tried to run your code but it seems there is no module named win32con
weird
now getting an error
AppData\Local\Programs\Python\Python312\Lib\site-packages\asciimatics\screen.py", line 1873, in <module>
import win32con
ModuleNotFoundError: No module named 'win32con'
Compare your asciimatics version. Run pip list
What version of asciimatics is yours @broken python ?
I've got 1.15
well I dont use asciimatics
you imported it though
in startscreen
terminal_width = os.get_terminal_size().columns
OSError: [Errno 9] Bad file descriptor
that's the new error
when I run it in a cmd window it works fine
probably it doesn't run well in IDLE
it's the default IDE that comes with python
im brand new to python and I mainly use game engines for programming and I dont know what an IDE is
ohhhh
now I understan
how can I change IDLE to somehting that works better for an ascii art game like mine?
so that it works for other people too
you are using visual studio
yea, IDLE is just an editor
ok
it doesn't
can you record using it in the cmd
for me it's working
ok
are you on windows?
you have a traceback there
how can I see it?
permission was denied to open load.save
hmmm
scrub the video slowly between 6-7 seconds
is it because im not an admin on my computer?
if you have a file load.save in the same directory that is the problem
its load .txt
do you have it open on your computer?
no
I might know why
this is my recycle bin
should I empty it
because my code just makes a new file
I don't know why it gives a permission denied to opening the load.text, but the recycle bin isn't it
is the directory read only or something
what do you mean
can you, with your current acount, open and change files and delete them?
in that folder
yes
I gtg to sleep, this is the erro, try googleing it
ERRNO 13, permission denied: 'load.text'
oh lol
if you find the issue if you don't mind message me, I'll see it when I wake up
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.