ArcPro 2.9.7
Conda 3.7
Error: "Exception: upload destination is invalid. CONT_0004: User folder does not exist."
I have a hosted AGO Notebook that works as expected and now I'm attempting to bring this down and re-write locally as a standalone .py script. The local .py script works but fails on this line,
pdf_report = survey_by_id.generate_report(templates[0], where=whereClause, utc_offset=offset, output_format="pdf", report_title=reportName, merge_files="nextPage", folder_id='e1d58030cf4a40a989beffc9349fa501')
I'm getting the AGO folder id by simply navigating to it and copying the &folder= parameter value from the url (so I know it's correct and it also works in the NB when running on AGOL).
Reason for bringing down local is over the life of the existing NB that runs daily on AGOL, we've seen some hiccups of that implementation -- sometimes it may have been a task scheduler thing or the NB would execute without errors/issues but would not generate the pdf output for some reason or another (but on subsequent manual attempts it would work just fine). The majority of the time it runs without issue but there's no real good way to monitor things and handle problems when they occur -- when you have a high visibility output that the NB generates then this is a problem because it requires constant babysitting.
We have a ton of experience with py 2.7 scripts running on a windows server vm that get run via the task scheduler and having them run locally there's simply more options available to handle execution failures in more hands-off approach.