Noob question - how to access 'pyhtml' pages?
See original GitHub issueHello,
I’m trying the MicroWebSrv
engine and it seems that serving static pages works fine. Using the controller methods also works fine. However, I have a serious issue with the pyhtml
engine.
That’s what I did:
- I copied
microWebSocket.py
,microWebSrv.py
andmicroWebTemplate.py
in/flash/lib
- I created simple static HTML page in
/flash/www/index.pyhtml
- I used the same initializiation code as from the provided sample
The initialization code:
from microWebSrv import MicroWebSrv
mws = MicroWebSrv()
mws.Start()
The issue is that whenever I try to access http://my-host
, my WiPy device hangs for a while and then it seems to restart itself. This happens only when I hit pyhtml
pages. Like I said, there is no problem serving static HTML files and there is no problem serving pages from controller methods. I guess I’m missing something. I’m using the latest ‘master’ source code. Could you please explain what I might be missing in my setup?
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
The most noob question you will ever read on HTML
The most noob question you will ever read on HTML ... Use index.html for your home page as when a user just types...
Read more >HTML5 Noob Question - HTML & CSS - SitePoint
Hey Everyone! Complete noob post here... I'm just getting started with HTML5. I'm reading a book on the subject.
Read more >Noob question, javascript - Codecademy
Once you get some HTML and CSS under your belt, you will be ready to introduce JavaScript to its intended environment, the web...
Read more >blank page when opening html file on localhost - Google Groups
I get a blank screen when I open elm-generated htlm files on localhost. Take a simple Elm program, such as. Module Test where....
Read more >(Noob Question) How to upload html files as webpages
Hello! I'm almost certain that this has been asked, but I could not find any other threads that answer my question. How do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI - I rebooted my device and suddenly my sample ‘pyhtml’ page worked. 😃
I guess there has been a lot of garbage in the RAM and after reboot it cleared. It’s strange, considering I should have approximately 4MB RAM according to the specs.
Anyway, problem solved.
I updated the firmware earlier today, so updating the firmware is not an option until new firmware comes out. Regarding the MicroPyhon options - I have no idea what you’re talking about but I’ll dig it further. I admit I’m still quite new to both WiPy and MicroPython.
For now I’m more than happy with the ability to process HTTP requests by using controller methods and that’s enough for my use cases. Thank you for the assistance on this matter!