Page 1 of 1

download&run takes very long time

Posted: Tue Sep 07, 2021 9:45 pm
by Vatalla
hello everyone,

I need help,
I'm trying to make air monitoring, the first time it ran everything was fine, after so many times, download&run when clicked took a very long time, when it was stopped and started again, OSError 112 appeared, here's the code

bme680.py

Boot.py

main.py

while download&run main.py its stuck at
Ready to download this file,please wait!
......................
download ok
exec(open('main.py').read(),globals())


I've searched on the internet, but still can't find an answer.

Please help

Re: download&run takes very long time

Posted: Wed Sep 08, 2021 5:50 am
by Roberthh
You did not tell which boar you use. But for most boards you have to upload your python scripts only once. Then they are permanent on the board (until you replace them) and will be executed at every boot.
P.S.: It seems that in your post main.py and boot.py link the same content.

Re: download&run takes very long time

Posted: Thu Sep 09, 2021 2:30 pm
by Vatalla
Sorry in advance, I've updated. I'm using esp32, could it be because it's flashed too often? every time executing web server always stuck. Tengkyu for your answer sir

Re: download&run takes very long time

Posted: Thu Sep 09, 2021 2:52 pm
by Roberthh
Unlikely. The typical flash number of flash write cycles is 10000. But that is a worst case number, and even that is sufficiently high. In an attempt to write until the flash fails, I achieved more than 1 Million write cycles.

Re: download&run takes very long time

Posted: Sat Sep 11, 2021 1:35 pm
by Vatalla
thanks in advance, is there any solution I can do for the case of esp32 stuck when "download and run" webserver on main.py, when the process is canceled and then restarted, OSError 112 appears. Which port is already in use even though main.py is not executing