Closed tannewt closed 4 years ago
I'm trying to test this, but am running into:
Traceback (most recent call last):
File "code.py", line 59, in <module>
File "code.py", line 48, in <module>
File "/lib/adafruit_pyportal.py", line 1082, in fetch
File "/lib/adafruit_pyportal.py", line 1079, in fetch
File "/lib/adafruit_pyportal.py", line 1056, in fetch
File "/lib/adafruit_pyportal.py", line 1056, in fetch
OSError:
No writable filesystem found for saving datastream. Insert an SD card or set internal filesystem to be unsafe by setting 'disable_concurrent_write_protection' in the mount options in boot.py
The reason for this is because an image file is not being written and it can't open a file that doesn't exist. This could be due to the changes made here. I'll continue to test.
With the adafruit_esp32spi library from the latest bundle it gives this error instead:
wget didn't write a complete file
Could you modify the code so it returns the exception that originates in requests? What example are you trying? You can also mention me on discord so we can debug in real time.
It looks like it may be caused by the missing content-length header in the PyPortal library. I'm continuing to dig.
Oh, just got this:
Traceback (most recent call last):
File "code.py", line 47, in <module>
File "/lib/adafruit_pyportal.py", line 1084, in fetch
File "/lib/adafruit_pyportal.py", line 1081, in fetch
File "/lib/adafruit_pyportal.py", line 1053, in fetch
File "/lib/adafruit_pyportal.py", line 760, in wget
File "/lib/adafruit_requests.py", line 650, in get
File "/lib/adafruit_requests.py", line 554, in request
File "/lib/adafruit_requests.py", line 551, in request
File "/lib/adafruit_requests.py", line 461, in _send_request
File "/lib/adafruit_requests.py", line 456, in _send
RuntimeError: Connection closed
Yeah, just got the same error again. I think the content-length thing was a fluke.
The thing is, the erroring is now consistent rather than intermittent in that it fails 100% of the time now.
I believe I didn't have your changes in place when I ran into that error. I'm trying again.
Here's the error with your changes in place:
Traceback (most recent call last):
File "code.py", line 47, in <module>
File "/lib/adafruit_pyportal.py", line 1087, in fetch
File "/lib/adafruit_pyportal.py", line 1084, in fetch
File "/lib/adafruit_pyportal.py", line 1058, in fetch
File "/lib/adafruit_pyportal.py", line 760, in wget
File "/lib/adafruit_requests.py", line 650, in get
File "/lib/adafruit_requests.py", line 539, in request
File "/lib/adafruit_requests.py", line 429, in _get_socket
File "/lib/adafruit_requests.py", line 425, in _get_socket
File "/lib/adafruit_requests.py", line 608, in connect
File "/lib/adafruit_requests.py", line 605, in connect
File "/lib/adafruit_esp32spi/adafruit_esp32spi_socket.py", line 75, in connect
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 755, in socket_connect
File "/lib/adafruit_esp32spi/adafruit_esp32spi.py", line 640, in socket_open
OSError: 23