Comments (2)
One thing to help, for future issues can you include the exact ampy command and parameters being run? That will help speed up troubleshooting issues.
In this case it looks like you're using the ampy run command to run the HTTP server code right? If so it looks like this is actually by design because you're running code that is waiting for a HTTP connection (the socket accept call). That wait might be very short if something is instantly trying to connect, or that wait could be very, very long if nothing is waiting to connect. The way the run command works is it takes your python script and runs it line by line, waiting for each line to finish and running the next. If a line takes too long (5 seconds IIRC) it will actually timeout and fail with the error you see.
There's a way to make this work though with scripts that run forever or for a long time, add the -n or --no-output option with the run command. That tells ampy not to wait for output and just run each line one after the other immediately. You want to use this when your script might run forever or might run for a very long time (greater than 5 seconds). You won't get any output since ampy doesn't know how long to wait to receive output, but you can actually open the serial REPL with screen or other tools and watch the output from the board.
So to work around this try running with the -n option, like:
ampy --port /path/to/serial/port run -n http_server_simplistic.py
from ampy.
Thanks Tony!
from ampy.
Related Issues (20)
- possibility to put files to a subdirectory
- not neccessarily working on esp32-cam-mb HOT 1
- Ampy cannot execute some commands due to various errors
- GET fails with CircuitPython
- On Ubuntu 22.04: ampy runs into an errror, ab ttyUSB0 is after then never available, till replugin the USB wire.
- put includes hidden folders like .git
- 未找到 'ampy' 命令
- timeout waiting for first EOF reception HOT 1
- Fix location of progress_bar
- How do printing and debug at minicom while ampy run? HOT 1
- I can run my main.py (blinky_1.py) test but the put command does not work
- new feature: add a STOP command HOT 1
- The reason why ampy is unreliable for a large number of boards, like ESP32CAM etc... HOT 2
- CAUTION - THIS PROJECT IS STALE (UNMAINTAINED). There is no point submitting PRs into it - nobody merges any of them... HOT 11
- Cannot upload file with specific starting character on Windows HOT 2
- `rmdir --missing-okay` not working on ESP32 w. MicroPython HOT 1
- infuriating behaviour of recursive put HOT 1
- ampy.pyboard.PyboardError: could not enter raw repl HOT 5
- ampy not working after raspberry pi 4 dist-upgrade
- Make a new release to PyPI please HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ampy.