Problem server does not load the total file htm.

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
alien
Posts: 5
Joined: Sat Nov 19, 2016 4:46 pm

Problem server does not load the total file htm.

Post by alien » Sat Nov 19, 2016 5:11 pm

I use this example in Esp8266 micropython https://github.com/RinusW/WiPy/tree/master/AiCWebserver
The problem is that the server does not display the total file htm.
Screenshot:
https://dl.dropboxusercontent.com/u/170 ... ie_001.png
https://dl.dropboxusercontent.com/u/170 ... ie_002.png
Does not load the total file htm.
What am I doing wrong ?

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Problem server does not load the total file htm.

Post by deshipu » Sat Nov 19, 2016 8:14 pm

Try using conn.sendall in place of con.send...

alien
Posts: 5
Joined: Sat Nov 19, 2016 4:46 pm

Re: Problem server does not load the total file htm.

Post by alien » Sat Nov 19, 2016 8:34 pm

Thank you, it works. However, constantly pop up errors in the terminal and the server crashes.Probably the problem is resources esp8266

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Problem server does not load the total file htm.

Post by deshipu » Sun Nov 20, 2016 9:34 am

Yes, you should send the file in smaller pieces, not all at once.

alien
Posts: 5
Joined: Sat Nov 19, 2016 4:46 pm

Re: Problem server does not load the total file htm.

Post by alien » Tue Nov 22, 2016 8:43 pm

Please can someone show an example of how to send html file in several parts. I'm a beginner.

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

Re: Problem server does not load the total file htm.

Post by Roberthh » Wed Nov 23, 2016 5:15 pm

However, constantly pop up errors in the terminal and the server crashes.
For me. the example works. I just changed the send() at sending the web page into sendall(), and replaced the tab's by spaces (the latter was not required). You do not have to split the send, since the data amount in minor.
aicwebtest.zip
(1.28 KiB) Downloaded 239 times

alien
Posts: 5
Joined: Sat Nov 19, 2016 4:46 pm

Re: Problem server does not load the total file htm.

Post by alien » Wed Nov 23, 2016 6:10 pm

Thank you

Post Reply