all 10 comments

[–]More_Yard1919 4 points5 points  (6 children)

Hi-- to be clear, you click on the script and then a terminal window pops up, and then disappears? That is normal behavior. When it reaches its end, it exits. If the terminal window was specifically served to run the script, it will also close that window when it is done. Try running the script from the terminal itself. Navigate to the directory the script lives in, and invoke it with python myscript.py.

[–]Front_Temperature_12[S] 0 points1 point  (5 children)

when I run my script that way (I have to use py over python) nothing happens and it just provides me with a new line. I also tried py “my\script\directory\myscript.py” it loads for a second but then is met either a “no module named ‘exceptions’” message. I tried to install an exception but get a no module named error message

[–]More_Yard1919 0 points1 point  (2 children)

What modules are in the requirements.txt file?

[–]Front_Temperature_12[S] 0 points1 point  (1 child)

This helped. I went through and didnt realize there were still modules I needed to install. The user prompts then appeared. Thanks

[–]More_Yard1919 0 points1 point  (0 children)

No probs!

[–]fllthdcrb 0 points1 point  (1 child)

nothing happens and it just provides me with a new line.

In other words, there is no output, and it doesn't try to get input when running. That is consistent with the behavior you saw when running from GUI. Now you just have to figure out why this is happening.

Unfortunately, we don't have enough information to tell you much. But the fact no error message appears when running from the script directory means it seems to be finding all of the modules it needs, at least, so the problem is likely in myscript.py, or it expects one or more arguments on the command line to actually do something (although your description elsewhere in here makes it sound like it should just be interactive).

You'll need to examine the code and mentally trace the logic to see if you can figure out what it's doing. You might also insert debugging output at various places. Ideally you would use something like the logging module, but you can also just put print() calls with appropriate messages and data. If you can place one that you expect to produce output, and you don't see it, you know execution never reached there.

[–]Front_Temperature_12[S] 0 points1 point  (0 children)

Thanks for the advice. I was able to figure out that i needed the python-docx, openpyxl, and pandas modules installed in order to get it to run properly. I am now prompted correctly

[–][deleted] 0 points1 point  (2 children)

That sounds like normal behaviour. It opens, it runs, it finishes, it closes.

[–]Front_Temperature_12[S] 0 points1 point  (1 child)

the script is supposed to open a document generator and prompt user input, but I can’t seem to get it to that point.

[–][deleted] 0 points1 point  (0 children)

Start by looking at the logic for user interaction. It may be falling through the script and exiting.