<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Python - API Error - 404 Not Found, b' ' in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568841#M9672</link>
    <description>&lt;P&gt;Starting to get this more and more in a script we've been using for over a year (it uses a few CSV files to build a new network in the dashboard with all the standard settings).&lt;/P&gt;&lt;P&gt;The problem started in the function that updates the info for devices in a network.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NJNetworkGuy100_0-1786455996764.png" style="width: 528px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/285584i496887816B340A6F/image-dimensions/528x33?v=v2" width="528" height="33" role="button" title="NJNetworkGuy100_0-1786455996764.png" alt="NJNetworkGuy100_0-1786455996764.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then, if it gets through the UpdateDevice API calls without an issue, I randomly get the error again in the function that updates the WAN IP info on the MX.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NJNetworkGuy100_1-1786456030282.png" style="width: 720px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/285585i939180F159C990ED/image-dimensions/720x24?v=v2" width="720" height="24" role="button" title="NJNetworkGuy100_1-1786456030282.png" alt="NJNetworkGuy100_1-1786456030282.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the code for updating the Device Info...the data is pulled in from a CSV file and the various data is entered into a list of dictionary objects, which is then used in this function.&amp;nbsp; Nothing crazy.&amp;nbsp; I've checked the CSV file in Notepad++, and the data looks good to me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NJNetworkGuy100_2-1786456132181.png" style="width: 968px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/285586iCA6D53C6408601BD/image-dimensions/968x266?v=v2" width="968" height="266" role="button" title="NJNetworkGuy100_2-1786456132181.png" alt="NJNetworkGuy100_2-1786456132181.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;These aren't the first API calls in the script...the claimNetworkDevices and createOrganizationNetwork are two API calls that have no issues and are called before these API calls.&lt;/P&gt;&lt;P&gt;Any advice or help would be appreciated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2026 14:00:07 GMT</pubDate>
    <dc:creator>NJNetworkGuy100</dc:creator>
    <dc:date>2026-08-11T14:00:07Z</dc:date>
    <item>
      <title>Python - API Error - 404 Not Found, b' '</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568841#M9672</link>
      <description>&lt;P&gt;Starting to get this more and more in a script we've been using for over a year (it uses a few CSV files to build a new network in the dashboard with all the standard settings).&lt;/P&gt;&lt;P&gt;The problem started in the function that updates the info for devices in a network.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NJNetworkGuy100_0-1786455996764.png" style="width: 528px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/285584i496887816B340A6F/image-dimensions/528x33?v=v2" width="528" height="33" role="button" title="NJNetworkGuy100_0-1786455996764.png" alt="NJNetworkGuy100_0-1786455996764.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then, if it gets through the UpdateDevice API calls without an issue, I randomly get the error again in the function that updates the WAN IP info on the MX.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NJNetworkGuy100_1-1786456030282.png" style="width: 720px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/285585i939180F159C990ED/image-dimensions/720x24?v=v2" width="720" height="24" role="button" title="NJNetworkGuy100_1-1786456030282.png" alt="NJNetworkGuy100_1-1786456030282.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the code for updating the Device Info...the data is pulled in from a CSV file and the various data is entered into a list of dictionary objects, which is then used in this function.&amp;nbsp; Nothing crazy.&amp;nbsp; I've checked the CSV file in Notepad++, and the data looks good to me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NJNetworkGuy100_2-1786456132181.png" style="width: 968px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/285586iCA6D53C6408601BD/image-dimensions/968x266?v=v2" width="968" height="266" role="button" title="NJNetworkGuy100_2-1786456132181.png" alt="NJNetworkGuy100_2-1786456132181.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;These aren't the first API calls in the script...the claimNetworkDevices and createOrganizationNetwork are two API calls that have no issues and are called before these API calls.&lt;/P&gt;&lt;P&gt;Any advice or help would be appreciated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2026 14:00:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568841#M9672</guid>
      <dc:creator>NJNetworkGuy100</dc:creator>
      <dc:date>2026-08-11T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python - API Error - 404 Not Found, b' '</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568847#M9673</link>
      <description>&lt;P&gt;It was not clear at what stage it was failing.&lt;/P&gt;
&lt;P&gt;Does this 404 crash happen on the &lt;STRONG class="rQesXe MPyX" data-copy-service-computed-style="font-family: &amp;quot;Google Sans&amp;quot;, Arial, sans-serif; font-size: 16px; font-weight: 700; margin: 0px; text-decoration: none; border-bottom: 0px rgb(10, 10, 10);" data-complete="true" data-sfc-root="ep" data-sfc-cp=""&gt;very first device&lt;/STRONG&gt; in the loop, or does it happen &lt;STRONG class="rQesXe MPyX" data-copy-service-computed-style="font-family: &amp;quot;Google Sans&amp;quot;, Arial, sans-serif; font-size: 16px; font-weight: 700; margin: 0px; text-decoration: none; border-bottom: 0px rgb(10, 10, 10);" data-complete="true" data-sfc-root="ep" data-sfc-cp=""&gt;randomly&lt;/STRONG&gt; on a device in the middle of the list?&lt;/P&gt;
&lt;P&gt;If you run the len (serialNum)&amp;nbsp; print statement, what is the &lt;STRONG class="rQesXe MPyX" data-copy-service-computed-style="font-family: &amp;quot;Google Sans&amp;quot;, Arial, sans-serif; font-size: 16px; font-weight: 700; margin: 0px; text-decoration: none; border-bottom: 0px rgb(10, 10, 10);" data-complete="true" data-sfc-root="ep" data-sfc-cp=""&gt;exact character count&lt;/STRONG&gt; returned for the failing device?&lt;/P&gt;
&lt;P&gt;I take that you can reach the API&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/errors/" target="_blank"&gt;https://developer.cisco.com/meraki/api-v1/errors/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2026 14:14:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568847#M9673</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2026-08-11T14:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Python - API Error - 404 Not Found, b' '</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568867#M9674</link>
      <description>&lt;P&gt;So, it can happen randomly in the loop....&lt;/P&gt;&lt;P&gt;I tested this morning, and it gave that 404 error to the first device a few times.&amp;nbsp; Then randomly, when running the script again, the first device made the UpdateDevice API call just fine, and the second device failed with the same error.&amp;nbsp; And then randomly a few times later, it got through all the devices just fine, and failed on the WAN IP Update API call (which is the next function in the script).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script always connects to the Dashboard fine, and runs a few API calls without issue before I get these 404 errors (getOrgNetworks, claimNetworkDevices, createOrgNetwork, to name a few).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2026 15:53:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568867#M9674</guid>
      <dc:creator>NJNetworkGuy100</dc:creator>
      <dc:date>2026-08-11T15:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python - API Error - 404 Not Found, b' '</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568949#M9675</link>
      <description>&lt;P&gt;Well, shoot.&amp;nbsp; It looks like I needed to add a decent "pause" to my script before making updates to devices that were just claimed in a network.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just added a time.sleep(15) function immediately AFTER the claimNetworkDevices API call (and before any other API call after that).&amp;nbsp; I don't know if the pause needs to be 15 seconds, but that seems a safe amount of time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That seems to have solved the issue...I'm going to keep testing, but it may just be as simple as the Meraki dashboard needing time to process the change in status of the devices (unclaimed to claimed).&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2026 21:30:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568949#M9675</guid>
      <dc:creator>NJNetworkGuy100</dc:creator>
      <dc:date>2026-08-11T21:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python - API Error - 404 Not Found, b' '</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568988#M9676</link>
      <description>&lt;P&gt;If the devices are being added to a brand-new network, the network may not be available immediately after creation.&lt;/P&gt;&lt;P&gt;What you could do is introduce a loop to query the network and see if you can find it, and if not, do a short pause and retry - and then start the process to add the devices.&lt;/P&gt;&lt;P&gt;I think you are pretty unlucky.&amp;nbsp; Networks tend to become available very quickly after they are created.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2026 22:56:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-api-error-404-not-found-b/m-p/5568988#M9676</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2026-08-11T22:56:44Z</dc:date>
    </item>
  </channel>
</rss>

