patch-baseline-operations fail with Python 3.10.6

0

After upgrading to 22.04 Ubuntu and going from Python 3.8.10 to Python 3.10.6, on updating the servers, our AWS patch-baseline fails with the error

  • AttributeError: module 'collections' has no attribute 'Callable'

Is there a way to handle the updated python version for this OS?

  • Full error: /usr/bin/python3 /usr/bin/apt-get Reading package lists... Building dependency tree... Reading state information... python3-apt is already the newest version (2.4.0ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded. Using python binary: 'python3' Using Python Version: Python 3.10.6 04/12/2023 11:42:39 root [INFO]: Downloading payload from https://s3.dualstack.eu-west-1.amazonaws.com/aws-ssm-eu-west-1/patchbaselineoperations/linux/payloads/patch-baseline-operations-1.105.tar.gz 04/12/2023 11:42:40 root [INFO]: Attempting to import entrance file os_selector 04/12/2023 11:42:40 root [INFO]: Running with snapshot id = 14c414a2-3e04-404e-b091-1a459900c012 and operation = Install 04/12/2023 11:42:40 root [ERROR]: Error loading entrance module. Traceback (most recent call last): File "/var/log/amazon/ssm/patch-baseline-operations/common_os_selector_methods.py", line 125, in _get_snapshot_info ssm_client = client_selector.get_default_client(instance_id, region, "ssm") File "/var/log/amazon/ssm/patch-baseline-operations/patch_common/client_selector.py", line 45, in get_default_client creds = get_metadata_creds() File "/var/log/amazon/ssm/patch-baseline-operations/patch_common/client_selector.py", line 159, in get_metadata_creds creds = credential_resolver.load_credentials() File "/var/log/amazon/ssm/patch-baseline-operations/botocore/credentials.py", line 1948, in load_credentials creds = provider.load() File "/var/log/amazon

  • File "/var/log/amazon/ssm/patch-baseline-operations/botocore/credentials.py", line 1009, in load creds = RefreshableCredentials.create_from_metadata( File "/var/log/amazon/ssm/patch-baseline-operations/botocore/credentials.py", line 382, in create_from_metadata expiry_time=cls._expiry_datetime(metadata['expiry_time']), File "/var/log/amazon/ssm/patch-baseline-operations/botocore/credentials.py", line 533, in _expiry_datetime return parse(time_str) File "/var/log/amazon/ssm/patch-baseline-operations/dateutil/parser.py", line 1164, in parse return DEFAULTPARSER.parse(timestr, **kwargs) File "/var/log/amazon/ssm/patch-baseline-operations/dateutil/parser.py", line 583, in parse if (isinstance(tzinfos, collections.Callable) or AttributeError: module 'collections' has no attribute 'Callable'

asked a year ago758 views
3 Answers
0
Accepted Answer

Hi,

Currently we do not have any ETA for Patch Manager support. Please refer - https://github.com/aws/amazon-ssm-agent/issues/485

We would recommend to wait for official support. You can refer our public documentation for latest updates. https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-prerequisites.html#supported-os

AWS
SUPPORT ENGINEER
Neha_R
answered a year ago
0

The following document described it.
https://docs.python.org/3/whatsnew/3.10.html#what-s-new-in-python-3-10

Remove deprecated aliases to Collections Abstract Base Classes from the collections module. (Contributed by Victor Stinner in bpo-37324.)

As you can see, it does not seem to work with Python 3.10.
If this answer has led to a solution, please approve the answer for the betterment of the community.

profile picture
EXPERT
answered a year ago
  • Thanks - but how can I get the patch-baseline-operations under-the-hood to work as we're dependent on AWS dependencies

  • I think the only way is to downgrade to Python 3.8.

0

Patch Manager currently doesn't support Python 3.10. Please refer following document for supported versions: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-prerequisites.html#python-version

The document also lists supported Operating System.

AWS
SUPPORT ENGINEER
Neha_R
answered a year ago
  • Thanks Neha R.

    1. Do you know if there's a timeline for 22.04 support? Specific date or general - like X months out?

    2. Also is a Python downgrade an option on this unsupported OS?

    Alex

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions