linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

[Bug]: TypeError: Got unexpected keyword argument 'request_checksum_calculation'

Open Osndok opened this issue 7 months ago • 7 comments

CLI Version

linode-cli v5.57.0 Built from spec version 4.198.0

Command

linode-cli obj ls

Output

Traceback (most recent call last):
  File "/home/user/.local/bin/linode-cli", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/__init__.py", line 248, in main
    plugins.invoke(parsed.command, plugin_args, context)
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/plugins.py", line 149, in invoke
    plugin.call(args, context)
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/__init__.py", line 423, in call
    COMMAND_MAP[parsed.command](
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/list.py", line 51, in list_objects_or_buckets
    client = get_client()
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/__init__.py", line 419, in get_client
    return _get_boto_client(current_cluster, access_key, secret_key)
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/__init__.py", line 451, in _get_boto_client
    config=Config(
  File "/home/user/.local/lib/python3.9/site-packages/botocore/config.py", line 275, in __init__
    self._user_provided_options = self._record_user_provided_options(
  File "/home/user/.local/lib/python3.9/site-packages/botocore/config.py", line 308, in _record_user_provided_options
    raise TypeError(f"Got unexpected keyword argument '{key}'")
TypeError: Got unexpected keyword argument 'request_checksum_calculation'

Expected Behavior

Given that I have no buckets yet, I was expecting to see some kind of empty list (maybe in a fancy tui frame) with an exit status of 0.

Actual Behavior

The above stack trace, with an exit status of 1.

Steps to Reproduce

At the moment, all I have to do is run linode-cli obj ls to reproduce it, but I don't know what state it is contingent on (e.g. would it stop erroring out if I create a bucket? is there a linode api deployment that adds/removes a this request checksum thing? etc).

Osndok avatar May 06 '25 21:05 Osndok

Additionally, on the advice of linode-cli --help (which said I could put --debug before the command), I tried this, but as you can see it did not provide any useful debugging information:

$ linode-cli --debug obj ls
usage: linode-cli obj ls [-h] [--as-user USERNAME] [--suppress-warnings] [--page PAGE] [--page-size PAGESIZE] [--all-rows] [NAME]
linode-cli obj ls: error: unrecognized arguments: --debug

Osndok avatar May 06 '25 21:05 Osndok

It might also be worth noting that this was observed immediately after the linode-cli asked me to give it a default region (us-southeast), so it might have updated the config file in an way that the current and future calls did not like, but "eyeballing" the config file "looks right to me".

$ linode-cli obj ls
Error: No default cluster is configured.  Either configure the CLI or invoke with --cluster to specify a cluster.

Default cluster for operations (e.g. `us-mia-1`) : us-southeast
Traceback (most recent call last):
  File "/home/user/.local/bin/linode-cli", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/__init__.py", line 248, in main
    plugins.invoke(parsed.command, plugin_args, context)
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/plugins.py", line 149, in invoke
    plugin.call(args, context)
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/__init__.py", line 423, in call
    COMMAND_MAP[parsed.command](
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/list.py", line 51, in list_objects_or_buckets
    client = get_client()
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/__init__.py", line 419, in get_client
    return _get_boto_client(current_cluster, access_key, secret_key)
  File "/home/user/.local/lib/python3.9/site-packages/linodecli/plugins/obj/__init__.py", line 451, in _get_boto_client
    config=Config(
  File "/home/user/.local/lib/python3.9/site-packages/botocore/config.py", line 275, in __init__
    self._user_provided_options = self._record_user_provided_options(
  File "/home/user/.local/lib/python3.9/site-packages/botocore/config.py", line 308, in _record_user_provided_options
    raise TypeError(f"Got unexpected keyword argument '{key}'")
TypeError: Got unexpected keyword argument 'request_checksum_calculation'

Osndok avatar May 06 '25 21:05 Osndok

Platform is rocky linux 8.10, --user installed via pip3.9 (from the official python39-pip package).

Osndok avatar May 06 '25 22:05 Osndok

Hi @Osndok, did you try upgrading boto3 or install Linode CLI with optional OBJ dependencies?

python3 -m pip install "linode-cli[obj]" -U

zliang-akamai avatar May 07 '25 06:05 zliang-akamai

No, I merely followed the instructions I saw the tool give:

$ linode-cli object-storage keys-delete $KEY_ID
The API responded with version 4.202.0, which is newer than the CLI's version of 4.191.1.  Please update the CLI to get access to the newest features.  You can update with a simple `pip3 install --upgrade linode-cli`

Osndok avatar May 07 '25 13:05 Osndok

As a side note, there is no support-like rush or pressure for this (on my side, anyway) as my workflow was quickly restored by downgrading to v5.55.0.

Osndok avatar May 07 '25 13:05 Osndok

Thanks for the update @Osndok! Can you try installing latest boto3 or Linode CLI with optional OBJ dependencies? The issue you encountered seems to be caused by outdated boto3.

Thank you for reporting the issue! We will be looking for a way to implement a more user friendly notification when boto3 is outdated, rather than raising an exception directly.

zliang-akamai avatar May 07 '25 14:05 zliang-akamai