Menu

No Output

Anonymous
2021-02-06
2021-02-07
  • Anonymous

    Anonymous - 2021-02-06

    I've been getting the "No Output" error when I try to run it. Although when I can python 3 to just python in python command under preferences it works properly. But that is just a temporary solution

     
    • Anonymous

      Anonymous - 2021-02-06

      change python 3*

       
  • Anonymous

    Anonymous - 2021-02-06

    What operating system are you using?

    In preference you should be pointing to your standard Python installation. If you normally use something like "python3 myproject.py" to start your projects, you SHOULD be able to use "python3" (all one word) in preferences without issue. If you have to change it to "python" to get it to work, there may be a bug in PAGE. Normally, the command "python" refers to Python 2.x, which is not supported by PAGE any longer.

    That having been said, if you are using PYENV to allow your system to run multiple versions of Python, you can use whatever you have set as your current global Python command.

     
  • Anonymous

    Anonymous - 2021-02-06

    I use windows. I'm new to python btw. I changed the python command in preferences to the python.exe file path and it worked fine. But when i reopen it the python command automatically gets changed to 'python3'. I use python 3.9 version. Could there really a bug in PAGE?
    I just don't get the output when the python command is set to 'python3' but works when set to 'python' or the python.exe path.

    Now that doing the above mentioned things makes it work, when i restart PAGE, the python command changes to 'python3' again and it again doesn't work so it's getting annoying

    Since i'm new to this, its a little difficult to understand what you're saying :( and this query was already posted before too. But I couldn't figure it out there. I appreciate your reply tho

     
    • Anonymous

      Anonymous - 2021-02-06

      Don't get the GUI output but get this message instead

       
  • Greg Walters

    Greg Walters - 2021-02-06

    Seeing your image helps.
    Can you tell me what version of PAGE you are running?

    My concern is that the Python Command in PAGE Preferences, once set, should not change.

    Yes, under Windows, you will probably need to include the path to Python 3.

    You might want to try this test...
    In a Command Box (Dos box) type:

    python -V

    then write down what's returned. Then try it again, but this time with:

    python3 -V

    I'm guessing that you have both Python 2.x AND Python 3.x installed (which is not surprising or a bad thing) but by calling just "python" it is running Python 2.x and not Python3.

    I'll ask Don to look into the possibility of the preferences not being kept properly.

    In the meantime, you might want to try creating an alias batch file as described at https://superuser.com/questions/193000/running-programs-by-typing-some-alias-in-windows

    That way, you can call Python3 from anywhere without having to deal with making sure you include the path.

    Greg

     
    • Anonymous

      Anonymous - 2021-02-06

      I use the version set vTcl(version) 6.0.1

      I never changed the Python Command in PAGE Preferences, but when I couldn't get the output I tried the methods mentioned above to make it work

      python -V in Command Prompt returns: Python 3.9.0 and
      python3 -V returns: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

      I'm pretty sure Python 3.9 is the only Python version I have. So the 'python3' in Python command should give me the output but for some reason it doesn't. I don't get the GUI window that pops up when you hit run in Generate Python GUI. Just 'No output' as in the image provided.

      If 'python' means Python 2, I do not know how it works since I don't have Python 2. Including the python.exe file path in Python command works too, but when I restart PAGE it automatically changes to python3

      I'm very sorry I do not know what an alias batch file means :( It is like creating an ,exe file?
      I'm actually very new to this so I hope you co-operate :)

      I suppose this query was asked before too, but couldn't get much help from it.
      Thanks in advance!

       
  • Greg Walters

    Greg Walters - 2021-02-06

    From your tests, you have Python 3.9. If you just type "python", that will start Python.

    Knowing that, in preferences you should just put "python". That's because your version of Windows uses that.

    If you had an older system, you would probably have Python version 2.x. But you don't so that's a good thing.

    Just set your "Python command" in preferences to "python" and then click the GREEN CHECKMARK. That will properly save things.

     
    • Anonymous

      Anonymous - 2021-02-06

      "Python command" in preferences to "python" and then click the GREEN CHECKMARK. That will properly save things. --> Is this solution only for the current project that I work on?

      Turns out every time when I reopen PAGE the "Python command" automatically gets set to 'python3' if I change it to 'python'.

      Same happens when I change it to the python.exe file path.

      The GREEN CHECKMARK does not save it permanently for other future project or the same one. I would have to manually change the python command every time I reopen PAGE.

      I know it's silly, but when I keep the Python Command blank, there's "3" automatically appended to the now-empty command. So even if I keep the command as "python" it changes to "python3"

      Is this not the latest version of PAGE that I have or not quite compatible with my system? I'm sorry it's maybe getting a little annoying for you, but it frustrating having to change the setting again and again.

      Is there a different version of PAGE available ? Or was it Just supposed to work with "python3"?

      I appreciate your quick help. Thank you in advance!

       
  • Greg Walters

    Greg Walters - 2021-02-06

    Is there a different version of PAGE available ? Or was it Just supposed to work with "python3"?

    Well, there are many older versions, but you are on the correct version for right now. I've alerted Don to the issue you are having. Yes, PAGE currently only works with Python 3.x . However, it shouldn't be changing the python command without you doing it.

    That having been said, the <run> command in the console window only is supposed to show you what your GUI will look like when you run it. You actually should be just saving the .tcl file then generating the two Python files (GUI file (.py) and the _support file ( project_support.py) and then running the file either from your IDE or directly from a command terminal (python(3) myproject.py) . The run command is designed to give you a quick preview. Not to actually run it all the time.</run>

     
    • Anonymous

      Anonymous - 2021-02-07

      Well it is actually changing the python command automatically. Was it supposed to be 'python' or 'python3'?

      The run command in the console window does not show me what my GUI would look like. It directly gives the output 'No Output'. I do actually save my file and then generate the .py and support file and then run it. Still it doesn't show me the window of what my GUI would look like, just no output.

      When I load my project from PyCharm and run it there, I do get the GUI and it functions properly! It just doesn't seem to work from the <run> command in the console window. </run>

      Thanks for your help!

       
  • Don Rozenberg

    Don Rozenberg - 2021-02-06

    Forgive me for joining late.

    First, The response of "No Output" in the Execution window of the Python console is not an error. It merely informs you that the execution did not produce any output to stdout which is where a print function sends its output. When the support module is created callback functions contain print functions which are meant to let you know that the callback had been entered - a kind of visual confirmation of the linkage between a GUI event and the associated callback.

    In Linux, where I do my development, I kick off execution using "UNIX" pipes and am able to display output to stdout as it happens. However, my knowledge of Windows is lacking and I was not able to implement a similar Windows mechanism. So I send any output fro print statements to a tmp file that is displayed when the execution terminates. If no such file has been created, then the "No Output" message. I would very much appreciate help improving the Windows behavior.

    Also, the python command for executing the GUI is specified in the Preferences window. In Linux "python3" suffices; in Windows the full path of the Python executable seems necessary, at least in my Virtual Machine testing environment. If you change a preference, I recommend exiting Page and restarting.

    I endorse Greg's remarks about the running you code in the Python console. The Python console was never meant to be an IDE.

     
    • Anonymous

      Anonymous - 2021-02-07

      Do I need to make some changes to get the GUI with the run command by having the python command as 'python3'

       
  • Anonymous

    Anonymous - 2021-02-07

    Thank you for the explanation!

    Doesn't matter if I change the python command 'python3' to 'python' or the full path of the Python executable, it automatically changes to 'python3' when I restart PAGE.

    'python' or the python.exe file path as the python command does the job for me. I get the required GUI as I want, instead of No Output as the result when having python3 as command. But again the command changes on its own.

    I did try to change the python command and then exiting PAGE and restarting as you suggested. But the command changes back to 'python3' anyway. Literally all the preferences that I change gets saved even when restarting PAGE, but EXCEPT for the python command.

    Running the code in PyCharm does the job for me. I get the GUI that I want perfectly when I run it there, but the run command in the console window does not show me the GUI, but straight up 'No Output'

    Thanks in advance!

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.