Page 1 of 1

Problem server does not load the total file htm.

Posted: Sat Nov 19, 2016 5:11 pm
by alien
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 ?

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

Posted: Sat Nov 19, 2016 8:14 pm
by deshipu
Try using conn.sendall in place of con.send...

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

Posted: Sat Nov 19, 2016 8:34 pm
by alien
Thank you, it works. However, constantly pop up errors in the terminal and the server crashes.Probably the problem is resources esp8266

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

Posted: Sun Nov 20, 2016 9:34 am
by deshipu
Yes, you should send the file in smaller pieces, not all at once.

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

Posted: Tue Nov 22, 2016 8:43 pm
by alien
Please can someone show an example of how to send html file in several parts. I'm a beginner.

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

Posted: Wed Nov 23, 2016 5:15 pm
by Roberthh
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 241 times

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

Posted: Wed Nov 23, 2016 6:10 pm
by alien
Thank you