Select to view content in your preferred language

Get layout name using arcpy will make the software hang (ArcGIS Pro 3.0)

985
2
06-30-2022 11:10 AM
cchen27
Emerging Contributor

Hi, 

I recently upgraded to ArcGIS Pro 3.0 and one of my old notebooks just hang and will never stop. The notebook is to export all layouts in a project, and I use the layout name for the export. I later did some tests and found the issue is due to getting the layout name. Not sure if this only happens to me (not able to try this on a different machine or reinstall it to test it out). With the following lines of code, my ArcGIS Pro 3.0 will hang at the last line - I can still navigate between different tabs, and close tabs, but cannot interrupt the kernel or close the software, basically causing the software unusable. Have to end the software in task manager. It doesn't matter if I run the following code in a notebook or python interactive window

aprx = arcpy.mp.ArcGISProject("CURRENT")

layouts = aprx.listLayouts()

l = layouts[0]

print(l.name)

 

 

Tags (2)
0 Kudos
2 Replies
RhettZufelt
MVP Notable Contributor

not much help, but I just tested your code in Pro 3 (interactive python window) on windows 10 and it prints the layout name.

R_

0 Kudos
JeffBarrette
Esri Regular Contributor

Hello @cchen27 ,

I can not reproduce this issue on Pro 3.0.  I tried with the Python window and a Notebook.  It is very important you submit this issue into support.  It must be a unique situation that needs to be diagnosed.  Things to try:

You mentioned an old notebook.  Can you run the same code in a new notebook?

Does it hang on printing any layout name or a specific one?

Could it be a special character in the name?

If we can get a project package that includes your notebook, that would be most helpful.

Thanks,

Jeff - arcpy.mp and Layout teams. 

0 Kudos