Share via

Problems uploading certain python packages to Automation Account

j lo 1 Reputation point
2025-04-02T23:29:25.8433333+00:00

Certain python packages fail to upload to an Automation Account.

I am trying to upload wheels for:
azure-mgmt-authorizationn version 3.0.0 or 4.0.0

For 4.0.0, I checked the setup.py file and found these dependencies:

install_requires=[
    "isodate<1.0.0,>=0.6.1",
    "azure-common~=1.1",
    "azure-mgmt-core>=1.3.2,<2.0.0",
    "typing-extensions>=4.3.0; python_version<'3.8.0'",
],

I was able to create wheels and upload these packages.

The activity log shows:

Create or Update an Azure Automation Python 3 package->Accepted
Create or Update an Azure Automation Python 3 package -> Started

It never shows Failed or Succeeded as expected.

In the Python packages blade, I can see the Package Status as Failed, with an error of:

Last modified
4/2/2025, 6:59:29 PM
Package version
Size
0 KB
Status
Failed
Runtime version
3.8
Error
Orchestrator.Shared.AsyncModuleImport.ModuleImportException: An internal error occurred during module import while attempting to store module content. This could be a transitory network condition - please try the operation again. at Orchestrator.Activities.SetModuleActivity.ExecuteInternal(CodeActivityContext context, Byte[] moduleContent, String moduleName, ModuleLanguage moduleLanguage, Guid moduleVersionId, String modulePath) at Orchestrator.Activities.SetModuleActivity.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Azure Automation
Azure Automation

An Azure service that is used to automate, configure, and install updates across hybrid environments.


1 answer

Sort by: Most helpful
  1. Sina Salam 30,166 Reputation points Volunteer Moderator
    2025-04-03T16:27:59.62+00:00

    Hello j lo,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having problems uploading certain python packages to automation account.

    To resolve the issue with uploading Python packages to Azure Automation, check that your network connection is stable, as transient network conditions can cause failures. Verify the package size, as a 0 KB size indicates a possible upload error. Retry the upload, as the error might be temporary. Also, confirm all dependencies listed in the setup.py file are correctly packaged and uploaded. Another thing is to use the correct wheel files for Python 3.8, and make sure your Azure Automation account and Python runtime are up to date. If the issue persists, consult the Azure Automation documentation or contact Azure support for further assistance. - https://learn.microsoft.com/en-us/azure/automation/python-3-packages

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.