I have an toolbox .tbx running a python / arcpy script that exports the layout to PDF and EPS . This toolbox worked in 2.7 , but now hangs in 2.8 . The lines it hangs on is:
the_layout.exportToPDF("C:\\temp\\test.pdf")
The same issue also occurs on:
the_layout.exportToPDF("C:\\temp\\now.pdf")
No exceptions are caught, the application just spins and does not return from the method call. Pressing cancel on the running toolbox does not stop this. Only killing the application in the task manager exits this. Oddly, the PDF file is created.
In the python window, the following code works as expected and does not hang:
aprx = arcpy.mp.ArcGISProject("current")
the_layout = aprx.listLayouts("letter_portrait")[0]
the_layout.exportToPDF("C:\\temp\\now.pdf")