<?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 Re: ArcGISProject.importDocument(mxd_path) hangs on broken datasource in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1496026#M70897</link>
    <description>&lt;P&gt;Can you share your current code, so we can see what you have going on?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2024 15:46:39 GMT</pubDate>
    <dc:creator>TonyAlmeida</dc:creator>
    <dc:date>2024-06-21T15:46:39Z</dc:date>
    <item>
      <title>ArcGISProject.importDocument(mxd_path) hangs on broken datasource</title>
      <link>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1495734#M70894</link>
      <description>&lt;P&gt;I'm working on a Python script that import mxd files with the importDocument function. The Python script is ran outside ArcGIS Pro using the default arcgispro-py3 environment, and the MXD datasources link to underlying geodatabases (Oracle geodatabase if that matters) that I do not have access to.&lt;/P&gt;&lt;P&gt;When I'm using the function, the process seems to take forever and never end. Launching the same script in the ArcGIS Pro console, I get windows asking for credentials which I just press on "Cancel", and the map document is properly imported to the project with broken datasources.&lt;/P&gt;&lt;P&gt;I believe that I have encountered the same issue when the MXD references MapService/FeatureService with SSL certificate errors.&lt;/P&gt;&lt;P&gt;Is there any way to use the import function that would behave the same way (or ignore datasources)?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 01:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1495734#M70894</guid>
      <dc:creator>HVN</dc:creator>
      <dc:date>2024-06-21T01:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISProject.importDocument(mxd_path) hangs on broken datasource</title>
      <link>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1495800#M70895</link>
      <description>&lt;P&gt;check isBroken in the layer class&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layer-class.htm" target="_blank"&gt;Layer—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 08:51:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1495800#M70895</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-06-21T08:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISProject.importDocument(mxd_path) hangs on broken datasource</title>
      <link>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1496026#M70897</link>
      <description>&lt;P&gt;Can you share your current code, so we can see what you have going on?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 15:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1496026#M70897</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2024-06-21T15:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISProject.importDocument(mxd_path) hangs on broken datasource</title>
      <link>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1496619#M70908</link>
      <description>&lt;P&gt;I took a quick look at the log of the diagonistic monitor. What seems to happen is that when using the import function, ArcGIS try to connect to the underlying DBMS with retries (around 5) before ignoring the datasource and importing it to the project.&lt;/P&gt;&lt;P&gt;In the case of Oracle, ArcGIS use the Oracle Client to connect to the DBMS. For some reasons, the connection attempt takes way longer before failing (more than 45s per attempt) whereas it fails almost immediatly on Postgres. Turning on the SQL*NET traces, we can notice that Oracle takes its sweet time to return an error message, with for example the following messages repeating for more than one hour...&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;nnfun2a: address for name "*******" not found&lt;BR /&gt;snlinGetAddrInfo: getaddrinfo() failed with error 11001&lt;BR /&gt;snlinGetAddrInfo: getaddrinfo() failed with error 11001&lt;BR /&gt;snlinGetAddrInfo: getaddrinfo() failed with error 11001&lt;BR /&gt;snlinGetAddrInfo: getaddrinfo() failed with error 11001&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I tried modifying the parameters through sqlnet.ora first with some success, but finally decided on straight up removing the client from my PATH environment variable.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 13:39:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgisproject-importdocument-mxd-path-hangs-on/m-p/1496619#M70908</guid>
      <dc:creator>HVN</dc:creator>
      <dc:date>2024-06-24T13:39:07Z</dc:date>
    </item>
  </channel>
</rss>

