<?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: Trouble creating `Layer` objects in ArcGIS Pro 2.2.4 in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395550#M17553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm closing this question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've contacted ESRI regarding this issue and it relates to their application architecture decision to ship miniconda within their application. If you are a python developer who already uses miniconda, you will have to delete all of your environments, uninstall miniconda/Anaconda and forever manage your&amp;nbsp;conda environments with ArcGIS "Pro" (which is clearly not for professionals who&amp;nbsp;already program in python).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any conda users know of a workaround for this case, please reply in this thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2018 19:37:07 GMT</pubDate>
    <dc:creator>AustinOrr</dc:creator>
    <dc:date>2018-11-15T19:37:07Z</dc:date>
    <item>
      <title>Trouble creating `Layer` objects in ArcGIS Pro 2.2.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395545#M17548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, I'm having much difficulty with the Make Feature Layer examples from the docs &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm#C_GUID-E7E83378-0AC6-48CE-A6F4-ACDF372AB3FF" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running arcpy from a standalone script using the&amp;nbsp;"c:\Program Files\ArcGIS\Pro\bin\Python\scripts\proenv.bat" provided by ESRI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In their example, it is possible to&amp;nbsp;set the workspace, and then pass a shapefile inside that workspace to the `MakeFeatureLayer_management` function. When I try this in a minimal script I get an unhelpful error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;test.py&amp;gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
print(arcpy.GetInstallInfo())
ws = 'C:\\Users\\myself\\testing\\test_query_bboxes'
fc = 'test_bboxes.shp'

arcpy.env.workspace = ws
arcpy.MakeFeatureLayer_management(fc, 'test_lyr')

&amp;lt;output&amp;gt;
&lt;PRE class="lia-code-sample line-numbers language-none"&gt;{'InstallDir': 'c:\\program files\\arcgis\\pro\\',&amp;nbsp; 
'Installer': 'myself',&amp;nbsp; 
'ProductName': 'ArcGISPro',&amp;nbsp; 
'Version': '2.2.4',&amp;nbsp; 
'SourceDir': 'C:\\Users\\myself\\Documents\\ArcGIS Pro 2.2\\ArcGISPro\\',&amp;nbsp; 
'InstallType': 'N/A',&amp;nbsp; 
'BuildNumber': '12813',&amp;nbsp; 
'InstallDate': '11/7/2018',&amp;nbsp; 
'InstallTime': '12:51:07',&amp;nbsp; 
'SPNumber': 'N/A',&amp;nbsp; 
'SPBuild': 'N/A'}

&lt;/PRE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class=""&gt;RuntimeError Traceback (most recent call last)
&amp;lt;ipython-input-1-f8756495bde9&amp;gt; in &amp;lt;module&amp;gt;()
 5 
 6 arcpy.env.workspace = gdb
----&amp;gt; 7 arcpy.MakeFeatureLayer_management(fc, 'test_lyr')

C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py in MakeFeatureLayer(in_features, out_layer, where_clause, workspace, field_info)
 6532 return retval
 6533 except Exception as e:
-&amp;gt; 6534 raise e
 6535 
 6536 @gptooldoc('MakeImageServerLayer_management', None)

C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py in MakeFeatureLayer(in_features, out_layer, where_clause, workspace, field_info)
 6529 from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
 6530 try:
-&amp;gt; 6531 retval = convertArcObjectToPythonObject(gp.MakeFeatureLayer_management(*gp_fixargs((in_features, out_layer, where_clause, workspace, field_info), True)))
 6532 return retval
 6533 except Exception as e:

C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py in &amp;lt;lambda&amp;gt;(*args)
 494 val = getattr(self._gp, attr)
 495 if callable(val):
--&amp;gt; 496 return lambda *args: val(*gp_fixargs(args, True))
 497 else:
 498 return convertArcObjectToPythonObject(val)

RuntimeError: Object: Error in executing tool

&lt;/SPAN&gt;```&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great with the `arcpy` from ArcMap 10.6 for both compete paths to the input featureclass (both in geodatabases an as shapefiles) and as&amp;nbsp;names within the workspace. What am in missing about how i'm supposed to initialize a `Layer` object in `arcpy` from ArcGIS Pro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395545#M17548</guid>
      <dc:creator>AustinOrr</dc:creator>
      <dc:date>2021-12-11T18:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble creating `Layer` objects in ArcGIS Pro 2.2.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395546#M17549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried your code using ArcGIS Pro 2.2.2 on my machine and it worked fine.&amp;nbsp; I will test again after I apply the 2.2.4 patch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 22:38:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395546#M17549</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-11-07T22:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble creating `Layer` objects in ArcGIS Pro 2.2.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395547#M17550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for checking, I don't think I can roll back to 2.2.2 to see if it's a bug in 2.2.4.&amp;nbsp;It seems unlikely that this is a regression, but their release notes do indicate that there may have been work done in the layer management code base between these two releases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 00:41:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395547#M17550</guid>
      <dc:creator>AustinOrr</dc:creator>
      <dc:date>2018-11-08T00:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble creating `Layer` objects in ArcGIS Pro 2.2.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395548#M17551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;pth &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\GIS\Centre_Ottawa\Data"&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetInstallInfo&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
ws &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; pth
fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'WardPopCT.shp'&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ws
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'test_lyr'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'InstallDir'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'c:\\arcgispro\\'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'Installer'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'dan_p'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'ProductName'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ArcGISPro'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'Version'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'2.2.4'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'SourceDir'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\\Computer\\ArcGISPro_2_2\\ArcGISPro\\'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'InstallType'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'N/A'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'BuildNumber'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'12813'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'InstallDate'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'2018-11-06'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'InstallTime'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'18:41:08'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'SPNumber'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'N/A'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'SPBuild'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'N/A'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'test_lyr'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;worked for me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:06:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395548#M17551</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T18:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble creating `Layer` objects in ArcGIS Pro 2.2.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395549#M17552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, works in 2.2.4 too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 17:15:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395549#M17552</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-11-08T17:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble creating `Layer` objects in ArcGIS Pro 2.2.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395550#M17553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm closing this question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've contacted ESRI regarding this issue and it relates to their application architecture decision to ship miniconda within their application. If you are a python developer who already uses miniconda, you will have to delete all of your environments, uninstall miniconda/Anaconda and forever manage your&amp;nbsp;conda environments with ArcGIS "Pro" (which is clearly not for professionals who&amp;nbsp;already program in python).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any conda users know of a workaround for this case, please reply in this thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 19:37:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395550#M17553</guid>
      <dc:creator>AustinOrr</dc:creator>
      <dc:date>2018-11-15T19:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble creating `Layer` objects in ArcGIS Pro 2.2.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395551#M17554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I can understand having to use ArcGIS Pro's conda environment to use ArcPy, that doesn't mean one has to delete all of your environments and other conda installations.&amp;nbsp; I run Pro's conda environment as well as a second miniconda environment, and I don't have any issues.&amp;nbsp; Maybe I am just misreading what you summarized.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2018 15:33:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/trouble-creating-layer-objects-in-arcgis-pro-2-2-4/m-p/395551#M17554</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-11-17T15:33:48Z</dc:date>
    </item>
  </channel>
</rss>

