Page 1 of 1

Automatic exit from thonny, change of screen resolution, python3 program.py will not work properly

Posted: Sat Feb 03, 2018 1:24 pm
by kafffee
Hi everyone,

I just bought a Raspberry Pi3 Model B and wrote my first python application.
However, for programming I just connect it to TV via HDMI. When I run the program though I disconnect the TV and run my Pi standalone.
Problem: After some time, which I havent figured out yet, screen resolution changes and thonny, on which I run the program on, is being quit. Plus to that, when I try to run the py file from the command line, it does not work properly and any command will not be carried out except for the print("") command.

Im really desperate about this so thank you so much in advance for answering.
:-)

Re: Automatic exit from thonny, change of screen resolution, python3 program.py will not work properly

Posted: Sat Feb 03, 2018 1:29 pm
by bensimmo
Post up the code, remember to use the code tag formatting.

Re: Automatic exit from thonny, change of screen resolution, python3 program.py will not work properly

Posted: Sat Feb 03, 2018 2:24 pm
by klricks
kafffee wrote:
Sat Feb 03, 2018 1:24 pm
Hi everyone,

I just bought a Raspberry Pi3 Model B and wrote my first python application.
However, for programming I just connect it to TV via HDMI. When I run the program though I disconnect the TV and run my Pi standalone.
Problem: After some time, which I havent figured out yet, screen resolution changes and thonny, on which I run the program on, is being quit. Plus to that, when I try to run the py file from the command line, it does not work properly and any command will not be carried out except for the print("") command.

Im really desperate about this so thank you so much in advance for answering.
:-)
How do you know the screen resolution has changed without a monitor attached? Are you connecting remotely by VNC?
When you run a Python 3 program from the command line then you must use python3 program.py
If you run with python program.py then that will default to python 2 and may not work with a python 3 program.