<?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[uiflow: usocket module does not work if upload a sketch through the &quot;download&quot;]]></title><description><![CDATA[<p dir="auto">I have a problem: the usocket module does not work if upload a sketch through the "download" item in the uiflow IDE.<br />
Here's an example of sketch:</p>
<p dir="auto"><em>from m5stack import lcd<br />
import usocket as socket</em></p>
<p dir="auto"><em>lcd.clear()<br />
lcd.setCursor(0, 0)<br />
lcd.setColor(lcd.WHITE)</em></p>
<p dir="auto"><em>try:<br />
addr = socket.getaddrinfo('<a href="http://micropython.org" target="_blank" rel="noopener noreferrer nofollow ugc">micropython.org</a>', 80)[0][-1]<br />
s = socket.socket()<br />
s.connect(addr)<br />
s.send(b'GET / HTTP/1.1\r\nHost: <a href="http://micropython.org" target="_blank" rel="noopener noreferrer nofollow ugc">micropython.org</a>\r\n\r\n')<br />
data = s.recv(1000)<br />
s.close()<br />
lcd.println("OK\n")<br />
lcd.print("Data len: " + str(len(data)))</em></p>
<p dir="auto"><em>except:<br />
lcd.print("Got Error!")</em></p>
<p dir="auto">If you upload by button with the triangle icon (looks like play) - it works, data received. If uploaded on the M5 through download - always fails.</p>
]]></description><link>https://community.m5stack.com/topic/803/uiflow-usocket-module-does-not-work-if-upload-a-sketch-through-the-download</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 00:23:23 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/803.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 Mar 2019 18:28:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to uiflow: usocket module does not work if upload a sketch through the &quot;download&quot; on Mon, 25 Mar 2019 06:12:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> The app starts after reboot M5 Fire, but the code is triggered in the exception block and displays message "Got Error!".</p>
]]></description><link>https://community.m5stack.com/post/3427</link><guid isPermaLink="true">https://community.m5stack.com/post/3427</guid><dc:creator><![CDATA[torabora]]></dc:creator><pubDate>Mon, 25 Mar 2019 06:12:27 GMT</pubDate></item><item><title><![CDATA[Reply to uiflow: usocket module does not work if upload a sketch through the &quot;download&quot; on Sun, 24 Mar 2019 19:43:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1068">@torabora</a> what do you mean by doesn't work.<br />
if you restart the m5stack, can you run the app from the app menu?</p>
]]></description><link>https://community.m5stack.com/post/3418</link><guid isPermaLink="true">https://community.m5stack.com/post/3418</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 24 Mar 2019 19:43:00 GMT</pubDate></item></channel></rss>