<?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 Why does arcpy.mp.ArcGISProject() give an OSError? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557489#M3748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read the "&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/guidelines-for-arcpy-mapping.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Guidelines for arcpy.mp&lt;/A&gt;" doc, but when I call the sample code myself in the ArcGIS Pro Python window or from a Python script, I get this error:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
aprx = arcpy.mp.ArcGISProject(r'C:\Path\To\Project\test_project.tbx')

Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\_mp.py", line 283, in __init__
&amp;nbsp;&amp;nbsp;&amp;nbsp; self._arc_object = arcgisscripting._mapping.ArcGISProject(*gp_fixargs((aprx_path,), True))
OSError: C:\Path\To\Project\test_project.tbx&lt;/PRE&gt;&lt;P&gt;Is this normal expected behavior?&amp;nbsp; The example code shows setting the project variable with an explicit .aprx file path, and I'm wondering why I'm unable to do the same on my machine.&amp;nbsp; The .aprx file is present/there are no misspellings in the file path in my code.&amp;nbsp; For reference, I'm running a fresh Windows 7 64-bit install with a fresh ArcGIS Desktop install as well (Pro v 1.4.1).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:37:39 GMT</pubDate>
    <dc:creator>MatthewCallahan1</dc:creator>
    <dc:date>2021-12-12T16:37:39Z</dc:date>
    <item>
      <title>Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557489#M3748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read the "&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/guidelines-for-arcpy-mapping.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Guidelines for arcpy.mp&lt;/A&gt;" doc, but when I call the sample code myself in the ArcGIS Pro Python window or from a Python script, I get this error:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
aprx = arcpy.mp.ArcGISProject(r'C:\Path\To\Project\test_project.tbx')

Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\_mp.py", line 283, in __init__
&amp;nbsp;&amp;nbsp;&amp;nbsp; self._arc_object = arcgisscripting._mapping.ArcGISProject(*gp_fixargs((aprx_path,), True))
OSError: C:\Path\To\Project\test_project.tbx&lt;/PRE&gt;&lt;P&gt;Is this normal expected behavior?&amp;nbsp; The example code shows setting the project variable with an explicit .aprx file path, and I'm wondering why I'm unable to do the same on my machine.&amp;nbsp; The .aprx file is present/there are no misspellings in the file path in my code.&amp;nbsp; For reference, I'm running a fresh Windows 7 64-bit install with a fresh ArcGIS Desktop install as well (Pro v 1.4.1).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:37:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557489#M3748</guid>
      <dc:creator>MatthewCallahan1</dc:creator>
      <dc:date>2021-12-12T16:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557490#M3749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from the&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/arcgisproject-class.htm"&gt; help topic &lt;/A&gt;why don't you reference the *.aprx, then you can get the toolbox as one of its properties.&amp;nbsp; You are referencing the toolbox (tbx) directly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 03:15:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557490#M3749</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-06-02T03:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557491#M3750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;lol I'm dumb, that was it! &amp;nbsp;Time for bed, enough&amp;nbsp;Python for today!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 03:33:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557491#M3750</guid>
      <dc:creator>MatthewCallahan1</dc:creator>
      <dc:date>2017-06-02T03:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557492#M3751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, might you know why one would get this same exact error, but I am actually referencing the *aprx file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 18:52:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557492#M3751</guid>
      <dc:creator>KevinChristy1</dc:creator>
      <dc:date>2018-10-04T18:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557493#M3752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you need to use Current in this circumstance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 18:56:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557493#M3752</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-10-04T18:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557494#M3753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Disregard, I realized that due to the nature that my project file and .aprx had the same name that I was omitting the project folder...Thanks though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 20:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/557494#M3753</guid>
      <dc:creator>KevinChristy1</dc:creator>
      <dc:date>2018-10-04T20:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1231911#M6407</link>
      <description>&lt;P&gt;Hi Dan I am also facing the same problem but with my aprx file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 19:21:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1231911#M6407</guid>
      <dc:creator>ShraddhaSharma</dc:creator>
      <dc:date>2022-11-15T19:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1250509#M6471</link>
      <description>&lt;P&gt;I'm having the same error, but with my .aprx path, not with a toolbox path.&amp;nbsp; Have any of you been able to solve the problem?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 19:16:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1250509#M6471</guid>
      <dc:creator>AllenDailey1</dc:creator>
      <dc:date>2023-01-23T19:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1250645#M6475</link>
      <description>&lt;P&gt;I think I figured it out.&amp;nbsp; I haven't 100% tested this yet, but I believe the error resulted from the .aprx being Pro 3.0 while the machine I was running my script on had Pro 2.7, so it could not open or use the .aprx.&amp;nbsp; I am going to upgrade that machine to Pro 3.0 sometime this week.&lt;/P&gt;&lt;P&gt;Update:&amp;nbsp; it worked!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 01:07:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1250645#M6475</guid>
      <dc:creator>AllenDailey1</dc:creator>
      <dc:date>2023-01-26T01:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1418045#M7026</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/206981"&gt;@AllenDailey1&lt;/a&gt;! Five minutes of Googling just saved me who knows how many hours of debugging.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 13:10:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1418045#M7026</guid>
      <dc:creator>Sean-Sweeney</dc:creator>
      <dc:date>2024-05-02T13:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1418136#M7027</link>
      <description>&lt;P&gt;You're welcome &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/443744"&gt;@Sean-Sweeney&lt;/a&gt;&amp;nbsp;!&amp;nbsp; Thanks so much for your comment; I'm so glad to know that my comment was useful for someone!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 15:13:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1418136#M7027</guid>
      <dc:creator>AllenDailey1</dc:creator>
      <dc:date>2024-05-02T15:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why does arcpy.mp.ArcGISProject() give an OSError?</title>
      <link>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1477521#M7051</link>
      <description>&lt;P&gt;The OSError also appears when calling .save() while the project is still open on a different machine.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 08:34:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/why-does-arcpy-mp-arcgisproject-give-an-oserror/m-p/1477521#M7051</guid>
      <dc:creator>StefanUseldinger</dc:creator>
      <dc:date>2024-05-23T08:34:18Z</dc:date>
    </item>
  </channel>
</rss>

