Closed vertigork closed 2 years ago
I can repro the failure on active projects.
It works correctly when using a Pro project on disk instead of CURRENT
.
@vertigork can you verify?
i'll test this out ASAP
@MikeMillerGIS tested in ArcGIS Pro against an active project, active map, with subtype group layers.
Describe the bug When the tool is run against a map that contains subtype group layers it will fail saying it cannot find the subtype layer.
To Reproduce Steps to reproduce the behavior:
Expected behavior The tool should complete without warnings or errors. The popups should be applied to each subtype layer in the subtype group layer. Esri best practices is to use subtype group layers, and the electric foundation maps provided by Esri contain subtype group layers so there is an expectation that this is supported.
Screenshots Start Time: Tuesday, December 28, 2021 10:27:21 AM udms.logic.add_popups( map_name='Utility Network - Popup', pro_project='CURRENT', options=['RULE_POPUP'], category_filters=None, ) Describing Utility Network Updating layers with rule popup Electric Device\High Voltage Switch Traceback (most recent call last): File "", line 20, in
File "C:\Code\Utility-Data-Management-Support-Tools\UtilityDataManagementSupport.atbx\udms\esri.py", line 87, in wrapper
File "C:\Code\Utility-Data-Management-Support-Tools\UtilityDataManagementSupport.atbx\udms\logic__init__.py", line 330, in add_popups
File "C:\Code\Utility-Data-Management-Support-Tools\UtilityDataManagementSupport.atbx\udms\logic\popup.py", line 319, in main
File "C:\Code\Utility-Data-Management-Support-Tools\UtilityDataManagementSupport.atbx\udms\logic\popup.py", line 241, in add_rule_popup
File "C:\Code\Utility-Data-Management-Support-Tools\UtilityDataManagementSupport.atbx\udms\logic\popup.py", line 139, in _add_rule_cim
File "C:\Code\Utility-Data-Management-Support-Tools\UtilityDataManagementSupport.atbx\udms\logic\popup.py", line 83, in _prepare_popup
File "C:\Code\Utility-Data-Management-Support-Tools\UtilityDataManagementSupport.atbx\udms\logic\popup.py", line 69, in _create_default_popup
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy__init__.py", line 1166, in ListFields
return gp.listFields(dataset, wild_card, field_type)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing_base.py", line 354, in listFields
self._gp.ListFields(*gp_fixargs(args, True)))
OSError: "High Voltage Switch" does not exist
Failed script (null)...
Failed to execute (ConfigureUtilityNetworkLayers).
Failed at Tuesday, December 28, 2021 10:27:29 AM (Elapsed Time: 7.96 seconds)
Desktop (please complete the following information):
Additional context The Utility Network File Geodatabase and Maps provided by the Esri in the Electric Foundations solution can be used to reproduce the issue