I have some Python scripts that export MXDs to PDFs. I initially created the scripts when we were using ArcGIS 10.5.x and they worked just fine - no errors.
We recently upgraded to 10.6.1 and now the scripts blow up with the following errors:
Traceback (most recent call last):
File "T:\Export-pdf-KY-1-of-1.py", line 45, in <module>
jpeg_compression_quality=vExportJpgCompression)
File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\utils.py", line 182, in fn_
return fn(*args, **kw)
File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\mapping.py", line 1156, in ExportToPDF
layout.exportToPDF(*args)
AttributeError: PageLayoutObject: Error in executing ExportToPDF
I've triple-checked to make sure there are no syntax errors, misspellings, or other errors in my scripts. Like I said, they used to work perfectly in 10.5.x, but not now in 10.6.1. I looked at the code in the Python scripts that are mentioned in the error message above, but I have no idea what to look for to try to fix the issue with my ExportToPDF scripts.
Any ideas?