You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/azure/automation/runbooks/error-running-python-runbook.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Troubleshoot issues with python packages in Azure Automation
2
+
title: Troubleshoot Issues with Python Packages in Azure Automation
3
3
description: Describes how to import, manage, and use Python packages in Azure Automation and provides a solution to an issue with python packages.
4
-
ms.date: 06/20/2025
4
+
ms.date: 06/25/2025
5
5
ms.reviewer: adoyle, v-weizhu
6
6
ms.service: azure-automation
7
7
ms.custom: sap:Runbook not working as expected
@@ -11,7 +11,7 @@ ms.custom: sap:Runbook not working as expected
11
11
The article shows how to import, manage, and use Python packages in Azure Automation running on the Azure sandbox environment and Hybrid Runbook Workers. Python packages should be downloaded on Hybrid Runbook workers for successful job execution. To help simplify runbooks, you can use Python packages to import the modules you need.
12
12
13
13
> [!NOTE]
14
-
> Azure Automation enables recovery of runbooks deleted in the last 29 days - Restore the deleted runbook by running a PowerShell script as a job in your Automation account. See [Restore deleted runbook](/azure/automation/manage-runbooks#restore-deleted-runbook) for more information.
14
+
> Azure Automation enables the recovery of runbooks deleted in the last 29 days. You can restore the deleted runbook by running a PowerShell script as a job in your Automation account. For more ingormation, see [Restore deleted runbook](/azure/automation/manage-runbooks#restore-deleted-runbook).
15
15
16
16
## Import Python 2 packages
17
17
@@ -27,7 +27,7 @@ After a package is imported, it's listed on the **Python packages** page in your
27
27
28
28
## Import packages with dependencies
29
29
30
-
Azure Automation doesn't resolve dependencies for Python packages during the import process. Use one of the following two methods to import a package with all its dependencies.
30
+
Azure Automation doesn't resolve dependencies for Python packages during the import process. Use one of the following methods to import a package with all its dependencies.
Once the packages and all its dependencies are downloaded, you can import them into your Automation account.
41
41
42
-
####Method 2: Use a runbook
42
+
### Method 2: Use a runbook
43
43
44
44
To get a runbook, [import Python 2 packages from pypi into Azure Automation account](https://github.com/azureautomation/import-python-2-packages-from-pypi-into-azure-automation-account).
45
45
@@ -53,7 +53,7 @@ When you start the runbook, ensure the following things:
53
53
- -a \<automationAccount\>
54
54
- -m \<modulePackage\>
55
55
56
-
The runbook allows you to specify what package to download. For example, set the `-m` parameter to `Azure` to downloads all Azure modules and all dependencies (approximately 105 packages).
56
+
The runbook allows you to specify which package to download. For example, set the `-m` parameter to `Azure` to download all Azure modules and all dependencies (approximately 105 packages).
57
57
- The runbook requires a managed identity for the Automation account to work.
58
58
59
59
After the runbook execution is complete, you can check the **Python packages** under **Shared Resources** in your Automation account to verify that the package is imported correctly.
@@ -63,11 +63,11 @@ After the runbook execution is complete, you can check the **Python packages** u
63
63
To support Python 3.8 runbooks in the Automation service, some Python packages are installed by default. For more information, see [Default Python packages](/azure/automation/default-python-packages). The default version can be overridden by importing Python packages into your Automation account. The imported version is preferred in your Automation account. To import a single package, see [Import a Python 3 package](#import-a-python-3-package). To import a package with multiple packages, see [Import a Python 3 package with dependencies](#import-a-python-3-package-with-dependencies).
64
64
65
65
> [!NOTE]
66
-
> There are no default packages installed for Python 3.10 (preview).
66
+
> Python 3.10 (preview) doesn't have default packages installed.
67
67
68
68
## Import a Python 3 package
69
69
70
-
1. In your Automation account, select **Python packages** under **Shared Resources**. Then select **+ Add a Python package**.
70
+
1. In your Automation account, select **Python packages** under **Shared Resources**. Then, select **+ Add a Python package**.
71
71
72
72
2. On the **Add Python Package** page, select a local package to upload. The package can be a **.whl** or **.tar.gz** file for Python 3.8 and a **.whl** file for Python 3.10 (preview).
73
73
@@ -111,17 +111,17 @@ Your runbook that uses those parameters fails with the following error:
111
111
112
112
> Total Length of Runbook Parameter names and values exceeds the limit of 30,000 characters. To avoid this issue, use Automation Variables to pass values to runbook.
113
113
114
-
**Cause:**
114
+
### Cause
115
115
116
116
Python 2.7, Python 3.8, and PowerShell 7.1 runbooks have a limit on the total length of characters for all parameters provided. The total length of all parameter names and values can't exceed 30,000 characters.
117
117
118
-
**Resolution:**
118
+
### Resolution
119
119
120
120
To resolve this issue, use Azure Automation Variables to pass values to the runbook or shorten parameter names and values so they don't exceed 30,000 characters in total.
121
121
122
-
## Reference
122
+
## References
123
123
124
124
-[Manage modules in Azure Automation](/azure/automation/shared-resources/modules)
125
125
-[Runbook execution in Azure Automation](/azure/automation/automation-runbook-execution)
126
126
-[Manage Python 2 packages in Azure Automation](/azure/automation/python-packages)
127
-
-[Manage Python 3 packages in Azure Automation](/azure/automation/python-3-packages)
127
+
-[Manage Python 3 packages in Azure Automation](/azure/automation/python-3-packages)
0 commit comments