Bug ID Number |
BUG-000151539 |
Submitted | August 12, 2022 |
Last Modified | February 7, 2025 |
Applies to | ArcGIS Pro |
Version found | 3.0 |
Operating System | N/A |
Operating System Version | N/A |
Status | Non-Reproducible
This issue was not reproducible when tested by the development team. Issues may be given this status when they cannot be reproduced or are no longer relevant in a development version of the software, but a specific fix was not installed to address the issue. The issue's Additional Information section may contain further explanation.
|
Additional Information
This issue is non-reproducible. Use the following modified script to join the newly changed directory so the LYRX can be found correctly:
import os
import arcpy
print(f'Currently in {os.getcwd()}\n')
fldr_scratch = os.path.join(os.getcwd(), 'fldr_scratch')
os.chdir(fldr_scratch)
print(f'Now in {os.getcwd()}\n')
layer = arcpy.mp.LayerFile(os.path.join(fldr_scratch, 'Boundary.lyrx'))
print(layer.filePath)
Workaround
Use the full path to the layer file (.lyrx) as a string or by using the os.path.join() function.
Steps to Reproduce