#🔒 Please help, problem with running .exe file

68 messages · Page 1 of 1 (latest)

acoustic maple
#

I've made .py program which should work as a test for students. After I transit it as an .exe file (it's required), it doesn't launch, some empty console opens and then closes in a second. I'll show the code and whatever you'll ask.

dusky zealotBOT
#

@acoustic maple

Python help channel opened

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.

acoustic maple
#

Discord bot says me the message is too long, so ask me in dm for my code, if you're gonna help

hollow stream
#

You should paste the code and copy the url and send it here

hollow stream
#

Yh

#

I dont know how to help with you code but wanted to let you know how to upload your code

acoustic maple
hollow stream
#

I think all we can do is wait for someone to help us

native ledge
native ledge
#

Also, why is the requirement to give it to students as an exe?

acoustic maple
#

Is there other ways to do it?

native ledge
# acoustic maple How to do it?

Honest question: How are you coding in python and not know how to open a console manually and run something in there?
Coding in python, you had to open cmd or powershell and run scripts, didn't you? It's the same, but just tell console to run filename.exe instead of py filename.py

acoustic maple
#

Also, I code in Python, using VisualCode

acoustic maple
native ledge
#

Then you should learn python basics first, where basic operations in terminal are needed.
Even in visual studio code, there's a terminal at the bottom

acoustic maple
#

For now my first position is to get this work done

native ledge
#

Then open the terminal and run the exe, and give us the error

acoustic maple
#

Sure, hold on

native ledge
#

Or since you missed your class, ask your teacher for extension on the task... Unless it was already long time to get it working and you're doing it last minute

native ledge
#

ls
Please

#

Seems like the exe is either different name or not here at all

#

ls is powershell binding for listing files in current directory

acoustic maple
native ledge
#

Ah, I read only the red part. The bottom in grey actually tells you how to run it

acoustic maple
#

I see, lemme try

#

Some big process launched, and that's what it says in the end

#

Also, I tried to launch .exe code again, now this time it scrolled some codes and also closed itself

#

No pause

sour garnet
#

So what else is it supposed to do?
It looks like the JSON file is there. The code just loads it then ends

acoustic maple
#

It still doesn't

#

Also interesting moment, some tries ago, when I made test version with 2 questions, the program worked

#

Since I changed it to 22 questions, it's just doesn't work

#

So anyone knows what to do?

sour garnet
#

What happens if you delete the JSON file and run the exe again?

acoustic maple
acoustic maple
sour garnet
#

So the program works?

acoustic maple
#

Ummm

#

No?

#

By the code, my program should work as .exe file with interface, when there tests and you click on answers

#

But it doesn't even launch anymore

sour garnet
#

The code you posted does not use tkinter at all though

acoustic maple
#

And again, it worked just today, I've had launched the program which has basic interface and allows me to take tests

#

So what actually happened is a big mystery to me

sour garnet
#

Did you paste all of the code into the link above? Like I said there is no code that uses tkinter so no GUI will open

acoustic maple
#

I'll let you know

native ledge
# acoustic maple https://paste.pythondiscord.com/2VCQ

The code from here just loads the questions and doesn't start any gui, just as Wolfy said - so the exe works exactly like the code said.

My guess is that when adding more questions, you deleted the code below that.

acoustic maple
acoustic maple
#

Alright everyone, so everything works now

#

I have the exact program I tried to make

#

Thanks for everyone who helped

#

Seems like I lost huge fucking part of a code

dusky zealotBOT
#
Python help channel closed

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.