AGOL Notebook crashing when creating PDF

1028
6
Jump to solution
02-18-2022 02:04 PM
LisaT
by
Occasional Contributor II

I am following this tutorial:https://www.esriuk.com/en-gb/news/we-talk-tech/printing-custom-layouts-from-arcgis-online. My goal is to print an AGOL map with a custom template. We do not have Enterprise, only an Organizational AGOL account. When going through the tutorial, everything appears to be working well: the code finds the APX and the layout, finds the title of the layout, etc. However, as soon as I try to use the "exportToPDF" function I get a wine error and the kernal dies. I am not new to programming, but am new to Notebooks and have not done a lot of Python (although I have used "exportToPDF in the past). Am I missing an import or something?

0Kudos
2 Solutions

Accepted Solutions
PhilipThompson11
New Contributor II

Hi Lisa, there was a bug introduced to runtime 5 which is causing this crash. Unfortunately you can no longer change the runtime version through the Notebook UI. However, you can use AGO Assistant to make that change.
https://assistant.esri-ps.com/

When you then open the Notebook you should be able to verify that it runs under runtime 4 and the kernel won’t crash.

Hope that helps.

Philip

View solution in original post

0Kudos
PhilipThompson11
New Contributor II

Hi Lisa,

Click View Item JSON. Then you should be able to edit the json and the runtime version from there.

json.JPG

View solution in original post

0Kudos
6 Replies
PhilipThompson11
New Contributor II

Hi Lisa, there was a bug introduced to runtime 5 which is causing this crash. Unfortunately you can no longer change the runtime version through the Notebook UI. However, you can use AGO Assistant to make that change.
https://assistant.esri-ps.com/

When you then open the Notebook you should be able to verify that it runs under runtime 4 and the kernel won’t crash.

Hope that helps.

Philip

0Kudos
LisaT
by
Occasional Contributor II

Thank you for replying so quickly! I am really hoping to get this working. I have not used the Assistant and cannot figure out how to change the runtime. When I click on the link you have above and I sign in, I can see my notebook. However, when I click on it the item details show but I only see the options to "View Item JSON", "View Item Resources", "Copy Item", and "Open in ArcGIS Online" (see attached screenshot). I can't seem to open the Notebook in the assistant? If I choose to open in AGOL, it takes a long time to redirect and open but, indeed, opens directly in AGOL with all of the same selections that AGOL has (It looks like I am running Python 3 for advanced 6). I do not see anywhere to change the runtime. Can you help me to find it? Im not sure if it matters, but the notebook is not currently shared.

0Kudos
PhilipThompson11
New Contributor II

Hi Lisa,

Click View Item JSON. Then you should be able to edit the json and the runtime version from there.

json.JPG

0Kudos
RaviNarayanan
Esri Contributor

Hello@PhilipThompson11@LisaT

You should be able to change the runtime associated with a notebook from the Notebook items settings pages. Not sure if this option worked?

https://doc.arcgis.com/en/arcgis-online/create-maps/specify-the-runtime-of-a-notebook.htm#ESRI_SECTI...

@LisaTHopefully you were able to get past the issue with exporting a PDF.

Screen Shot 2022-04-28 at 12.49.15 PM.png

0Kudos
PhilipThompson11
New Contributor II

Hi Ravi, The workaround is to change the runtime version, not the runtime type. The version can only be edited through AGO Assistant. The bug is still open.

0Kudos
RaviNarayanan
Esri Contributor

Hi@PhilipThompson11You should be seeing a dropdown like this - for selecting a runtime (type/version). Please let us know if this doesn't help. Will check out the exportToPDF use case.

Screen Shot 2022-04-28 at 12.48.30 PM.png