Select to view content in your preferred language

ExportToPDF with arcpy fails

1044
12
03-11-2025 06:06 AM
Dalneberg
Emerging Contributor

I have a pythonscript that exports pdf with arcpy.exportToPDF.

It has worked well until december 2024/january 2025.

It works on my machine (with Windows 11) in Windows scheduler (with option: Run whether user is logged in or not). (I have a runner.bat that runs a pythonfile.)

But it does not work on a Windows Server (We have upgraded from Windows Server 2019 to 2022 but it did not make any difference).

On this Windows server it only works to run when i run it right in the commandtool, or in a windows task scheduler with the option: Run only when the user is logged on.

I have tried with ArcGIS Server on the server, and also tried with only ArcGISPro (3.3) on the server. Both with MicrosoftEdgeWebView2RuntimeInstallerX64 installed (test is done with version 133.0.3065.92 and 134.0.3124.51).

I also tried with a older version of ArcGISPro.

I have all admin permissions on the folders and in task scheduler.

So, the question is what can cause this arcpy.exportToPDF to fail? and without any errormessages.

12 Replies
jschuckert
Regular Contributor

I am still unfortunately stuck with no resolution on this. I have been working with our IT Department and tried opening a new ESRI case however no luck in either avenue. For the new ESRI case, I provided several new links related to the issue (this page for example) but they also came back stating it must be a Windows based issue per the Task Scheduler behavior when selecting "run whether use is logged in or not" when running the task.

Has anyone found a solution to this? 

0 Kudos
Dalneberg
Emerging Contributor

@jschuckert 
Hi, this problem is now solved in our enviroment! i.e. exporting pdf with arcpy via task scheduler and then also via FME Flow, works again!

It started working on 20/5 after our IT installed the month's windows patches on the entire production environment, they also updated vmware tools in connection with that. Now it is vmware version 12.5.2. The guy at IT is unsure what version it was before.

I have not received any confirmation what made this particular thing start working again, it would have been interesting to know.

jschuckert
Regular Contributor

Thanks for the update @Dalneberg . That is at least somewhat hopeful and good to hear in your case.

I just tested and it is unfortunately still broken in our environment. That said, I am unsure what updates we have available for our various servers. I am hoping we have some ready to be applied for some before/after testing.

You are on Windows Server 2022, correct? We are on older server OS so it is hard to say how that will play into any patch fixes.

0 Kudos