Public bug reported:

Attempting to run certain commands in resolute (26.04 LTS) fails:
```
$ aws ssm send-command

badly formed help string
```

This is due to python3.14's argparse being more strict with % signs in help 
strings, added in the following cpython commit:
```
commit eb2d268ac7480b5e2b4ffb9a644cad7ac75ae954
Author: Serhiy Storchaka <[email protected]>
Date:   Sat Oct 12 13:10:50 2024 +0300

    gh-65865: Raise early errors for invalid help strings in argparse
(GH-124899)

```

Debian's same version of this package doesn't suffer from the issue,
since even their unreleased "forky" is still using python3.13.


The upstream fix is 
https://github.com/aws/aws-cli/commit/44e446748504ed5a17df7c41c77c190bcba9fc5a 
which ultimately results in just the following change to fix handling of 
documentation from the JSON files:
```
--- /usr/lib/python3/dist-packages/awscli/arguments.py.orig     2025-11-13 
09:11:42.000000000 +0000
+++ /usr/lib/python3/dist-packages/awscli/arguments.py  2026-06-19 
10:55:05.796862082 +0100
@@ -449,7 +449,7 @@
         cli_name = self.cli_name
         parser.add_argument(
             cli_name,
-            help=self.documentation,
+            help=self.documentation.replace('%', '%%'),
             type=self.cli_type,
             required=self.required,
         )
```

With this patch the command then runs as expected:
```
$ aws ssm send-command

aws: [ERROR]: the following arguments are required: --document-name

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help


```

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: awscli 2.31.35-1
ProcVersionSignature: Ubuntu 7.0.0-15.15-generic 7.0.0
Uname: Linux 7.0.0-15-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: Regolith-Wayland:GNOME:sway
Date: Fri Jun 19 10:55:53 2026
InstallationDate: Installed on 2020-10-08 (2079 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
PackageArchitecture: all
SourcePackage: awscli
UpgradeStatus: Upgraded to resolute on 2026-04-16 (64 days ago)

** Affects: awscli (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2157588

Title:
  Running some commands results in 'badly formed help string'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/awscli/+bug/2157588/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to