<?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[TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27;]]></title><description><![CDATA[<p dir="auto">Trying to connect to Azure but getting <code>TypeError: argument should be bytes, buffer or ASCII string, not 'NoneType'</code><br />
for the sas key</p>
]]></description><link>https://community.m5stack.com/topic/4014/typeerror-argument-should-be-bytes-buffer-or-ascii-string-not-nonetype</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 10:36:37 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4014.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Feb 2022 17:39:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 20:54:48 GMT]]></title><description><![CDATA[<p dir="auto">So I loose the error but have no sign that its connecting, I have a monitor running is VSCode but it show no sign of the core connecting.</p>
]]></description><link>https://community.m5stack.com/post/16598</link><guid isPermaLink="true">https://community.m5stack.com/post/16598</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 09 Feb 2022 20:54:48 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 11:10:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/3966">@iamliubo</a> Much, much better thank you!</p>
]]></description><link>https://community.m5stack.com/post/16593</link><guid isPermaLink="true">https://community.m5stack.com/post/16593</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 09 Feb 2022 11:10:34 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 11:02:47 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></p>
<p dir="auto">Is this better?<br />
<img src="/assets/uploads/files/1644404506771-432de5e5-4245-4eef-aa72-21b27cd22a2c-image.png" alt="0_1644404506540_432de5e5-4245-4eef-aa72-21b27cd22a2c-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/16592</link><guid isPermaLink="true">https://community.m5stack.com/post/16592</guid><dc:creator><![CDATA[IAMLIUBO]]></dc:creator><pubDate>Wed, 09 Feb 2022 11:02:47 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 10:10:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/3966">@iamliubo</a> yeh I managed to work out that SAS stands for Secure Access String buts it’s confusing for new people to label the block as SAS when it’s actually the PCS code that has to be typed in. I’ll try the primary key tonight when I get back to the shop.</p>
]]></description><link>https://community.m5stack.com/post/16591</link><guid isPermaLink="true">https://community.m5stack.com/post/16591</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 09 Feb 2022 10:10:44 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 09:33:11 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></p>
<p dir="auto">Actually SAS is a authentication type,  we use <strong>Primary Connection String</strong> calculate the <strong>sas_token</strong>, supports passing two parameters "connection_string" and "sas_token", but "sas_token" can be calculated by "connection_string", so block omits the second parameter, but connection_string is essential.<br />
<img src="/assets/uploads/files/1644398678155-e3026aba-5cee-46db-a93a-1ec3c3376572-image-resized.png" alt="0_1644398677740_e3026aba-5cee-46db-a93a-1ec3c3376572-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">e.g.</p>
<pre><code class="language-python">azure = IoT_Hub(connection_string="xxxxxxx", sas_token="xxxxxxx")
</code></pre>
]]></description><link>https://community.m5stack.com/post/16590</link><guid isPermaLink="true">https://community.m5stack.com/post/16590</guid><dc:creator><![CDATA[IAMLIUBO]]></dc:creator><pubDate>Wed, 09 Feb 2022 09:33:11 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 08:59:03 GMT]]></title><description><![CDATA[<p dir="auto">Thanks I have been trying to use an sas key instead of the pcs key as that what the label says. Please change sas to pcs</p>
]]></description><link>https://community.m5stack.com/post/16588</link><guid isPermaLink="true">https://community.m5stack.com/post/16588</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 09 Feb 2022 08:59:03 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 06:34:36 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a></p>
<p dir="auto">Please try use <strong>Primary Connection String</strong>:<br />
<img src="/assets/uploads/files/1644388366817-6b767f55-22a2-4ca0-bbb4-069bafa1033c-image.png" alt="0_1644388364784_6b767f55-22a2-4ca0-bbb4-069bafa1033c-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/16582</link><guid isPermaLink="true">https://community.m5stack.com/post/16582</guid><dc:creator><![CDATA[IAMLIUBO]]></dc:creator><pubDate>Wed, 09 Feb 2022 06:34:36 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 06:19:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/3966">@IAMLIUBO</a><br />
This is the simple code that generates the error:</p>
<p dir="auto"><img src="/assets/uploads/files/1644387548216-screenshot-2022-02-09-at-06.18.33.png" alt="0_1644387547710_Screenshot 2022-02-09 at 06.18.33.png" class=" img-fluid img-markdown" /></p>
<pre><code>from m5stack import *
from m5stack_ui import *
from uiflow import *
from IoTcloud.Azure import IoT_Hub

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)

azure = IoT_Hub(connection_string='HostName=UIFlow.azure-devices.net;DeviceId=M5Stack_AWS;SharedAccessSignature=SharedAccessSignature sr=UIFlow.azure-devices.net%2Fdevices%2FM5Stack_AWS&amp;sig=R22UG%2Bf6uGEIq4Z0Rty1QCU9OWVq5R3%2FUrOUN9ogGgE%3D&amp;se=1644387423')
</code></pre>
<p dir="auto">And don't worry as the string has already been locked.</p>
]]></description><link>https://community.m5stack.com/post/16581</link><guid isPermaLink="true">https://community.m5stack.com/post/16581</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 09 Feb 2022 06:19:13 GMT</pubDate></item><item><title><![CDATA[Reply to TypeError: argument should be bytes, buffer or ASCII string, not &#x27;NoneType&#x27; on Wed, 09 Feb 2022 03:09:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Could you paste your code?</p>
]]></description><link>https://community.m5stack.com/post/16580</link><guid isPermaLink="true">https://community.m5stack.com/post/16580</guid><dc:creator><![CDATA[IAMLIUBO]]></dc:creator><pubDate>Wed, 09 Feb 2022 03:09:58 GMT</pubDate></item></channel></rss>