<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[microWebSrv2 on M5atom lite with micropython]]></title><description><![CDATA[<p dir="auto">I'm trying to install the web server microWebSrv2 on a M5atom lite.<br />
<a href="https://github.com/jczic/MicroWebSrv2#install" target="_blank" rel="noopener noreferrer nofollow ugc">github microWebSrv2</a></p>
<p dir="auto">Has anyone done this before without freezing?<br />
Would be grateful for any hint.</p>
<p dir="auto"><strong>I copied the files with ampy to the m5atom lite, here is the file structure on the M5atom lite:</strong></p>
<p dir="auto">/ConnectWiFi.py<br />
/MicroWebSrv2/<strong>init</strong>.py<br />
/MicroWebSrv2/httpRequest.py<br />
/MicroWebSrv2/httpResponse.py<br />
/MicroWebSrv2/libs/XAsyncSockets.py<br />
/MicroWebSrv2/libs/XAsyncSocktes.py<br />
/MicroWebSrv2/libs/urlUtils.py<br />
/MicroWebSrv2/microWebSrv2.py<br />
/MicroWebSrv2/mods/PyhtmlTemplate.py<br />
/MicroWebSrv2/mods/WebSockets.py<br />
/MicroWebSrv2/webRoute.py<br />
/SSL-Cert/openhc2.crt<br />
/SSL-Cert/openhc2.key<br />
/boot.py<br />
/img/microWebSrv2.png<br />
/lib/urequests.py<br />
/main.py<br />
/www/favicon.ico<br />
/www/index.html<br />
/www/pdf.png<br />
/www/style.css<br />
/www/test.pyhtml<br />
/www/wschat.html<br />
/www/wstest.html</p>
<p dir="auto"><strong>And run into this error when booting:</strong></p>
<p dir="auto">Connection successful<br />
('192.168.1.46', '255.255.255.0', '192.168.1.1', '192.168.1.1')<br />
running on M5atom lite</p>
<pre><code>   ---------------------------
   - Python pkg MicroWebSrv2 -
   -      version 2.0.6      -
   -     by JC`zic &amp; HC2     -
   ---------------------------
</code></pre>
<p dir="auto">I (6206) modsocket: Initializing</p>
<ul>
<li>[@WebRoute] GET /test-redir</li>
<li>[@WebRoute] GET /test-post (TestPost1/2)</li>
<li>[@WebRoute] POST /test-post (TestPost2/2)</li>
</ul>
<p dir="auto">Traceback (most recent call last):<br />
File "<a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>", line 153, in &lt;module&gt;<br />
File "MicroWebSrv2/microWebSrv2.py", line 136, in LoadModule<br />
MicroWebSrv2Exception: Cannot load module "WebSockets".<br />
MicroPython v1.13 on 2020-09-02; TinyPICO with ESP32-PICO-D4<br />
Type "help()" for more information.</p>
<blockquote>
<blockquote>
<blockquote></blockquote>
</blockquote>
</blockquote>
<p dir="auto"><strong>this is raised by this code in MicroWebSrv2/microWebSrv2.py:</strong><br />
# ------------------------------------------------------------------------</p>
<pre><code>@staticmethod
def LoadModule(modName) :
    if not isinstance(modName, str) or len(modName) == 0 :
        raise ValueError('"modName" must be a not empty string.')
    if modName in MicroWebSrv2._modules :
        raise MicroWebSrv2Exception('Module "%s" is already loaded.' % modName)
    try :
        modPath  = MicroWebSrv2.__module__.split('microWebSrv2')[0] \
                 + ('mods.%s' % modName)
        module   = getattr(__import__(modPath).mods, modName)
        modClass = getattr(module, modName)
        if type(modClass) is not type :
            raise Exception
        modInstance = modClass()
        MicroWebSrv2._modules[modName] = modInstance
        return modInstance
    except :
        raise MicroWebSrv2Exception('Cannot load module "%s".' % modName)
</code></pre>
]]></description><link>https://community.m5stack.com/topic/2609/microwebsrv2-on-m5atom-lite-with-micropython</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 15:40:26 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2609.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Dec 2020 02:49:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to microWebSrv2 on M5atom lite with micropython on Wed, 16 Dec 2020 20:54:13 GMT]]></title><description><![CDATA[<p dir="auto">It's probably a typo. I think there should be a <strong>/</strong> on the line instead of <strong>.</strong></p>
<p dir="auto">Instead:</p>
<pre><code> ('mods.%s' % modName)
</code></pre>
<p dir="auto">i think it should be:</p>
<pre><code>('mods/%s' % modName)
</code></pre>
<p dir="auto">or</p>
<pre><code>('mods\\%s' % modName)
</code></pre>
]]></description><link>https://community.m5stack.com/post/11241</link><guid isPermaLink="true">https://community.m5stack.com/post/11241</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Wed, 16 Dec 2020 20:54:13 GMT</pubDate></item></channel></rss>