download&run takes very long time

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
Vatalla
Posts: 3
Joined: Tue Sep 07, 2021 9:08 pm

download&run takes very long time

Post by Vatalla » Tue Sep 07, 2021 9:45 pm

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
Last edited by Vatalla on Thu Sep 09, 2021 2:35 pm, edited 1 time in total.

User avatar
Roberthh
Posts: 2841
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: download&run takes very long time

Post by Roberthh » Wed Sep 08, 2021 5:50 am

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.

Vatalla
Posts: 3
Joined: Tue Sep 07, 2021 9:08 pm

Re: download&run takes very long time

Post by Vatalla » Thu Sep 09, 2021 2:30 pm

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

User avatar
Roberthh
Posts: 2841
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: download&run takes very long time

Post by Roberthh » Thu Sep 09, 2021 2:52 pm

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.

Vatalla
Posts: 3
Joined: Tue Sep 07, 2021 9:08 pm

Re: download&run takes very long time

Post by Vatalla » Sat Sep 11, 2021 1:35 pm

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

Post Reply