#873179 awscli: All "aws ec2" commands fail with "get_environ_proxies() [...]"

Package:
awscli
Source:
awscli
Submitter:
Sebastien Delafond
Date:
2017-10-24 14:12:03 UTC
Severity:
important
#873179#5
Date:
2017-08-25 10:50:11 UTC
From:
To:
With AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY properly exported, and
no '.*(proxy|PROXY).*' environment variables, all my aws ec2 commands
fail in the same exact fashion:

  # aws ec2 --region us-east-1 describe-instances --instance-ids [...]

  get_environ_proxies() missing 1 required positional argument: 'no_proxy'

I have another sid system where "aws ec2" is fully fonctional, and the
only difference I could readily identify was python3-requests (a
python3-botocore dependency) being 2.12.4-1 instead of
2.18.1-1. However, downgrading to that on the affected system does not
fix the issue.

I could not find any reference to the error message anywhere, so I'm
filing this bug so it can be first indexed, and hopefully later triaged
properly.

Cheers,

#873179#10
Date:
2017-10-24 14:01:02 UTC
From:
To:
aws-cli/1.11.139 Python/3.5.4 Linux/4.13.0-1-amd64 botocore/1.6.6


2017-10-25 01:00:15,732 - MainThread - awscli.clidriver - DEBUG - CLI
version: aws-cli/1.11.139 Python/3.5.4 Linux/4.13.0-1-amd64 botocore/1.6.6
2017-10-25 01:00:15,732 - MainThread - awscli.clidriver - DEBUG - Arguments
entered to CLI: ['--debug', 's3', 'ls']
2017-10-25 01:00:15,732 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function add_scalar_parsers at
0x7f9c5244c950>
2017-10-25 01:00:15,732 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function
inject_assume_role_provider_cache at 0x7f9c52e92d08>
2017-10-25 01:00:15,733 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.s3: calling handler <function add_waiters at
0x7f9c52451c80>
2017-10-25 01:00:15,733 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.custom.s3.anonymous: calling handler <function uri_param at
0x7f9c52ec5e18>
2017-10-25 01:00:15,733 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.ls: calling handler <function add_waiters at
0x7f9c52451c80>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.custom.ls.page-size: calling handler <function uri_param at
0x7f9c52ec5e18>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.custom.ls.summarize: calling handler <function uri_param at
0x7f9c52ec5e18>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
process-cli-arg.custom.ls: calling handler
<awscli.argprocess.ParamShorthandParser object at 0x7f9c52e5c828>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.custom.ls.paths: calling handler <function uri_param at
0x7f9c52ec5e18>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.custom.ls.request-payer: calling handler <function uri_param
at 0x7f9c52ec5e18>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.custom.ls.human-readable: calling handler <function uri_param
at 0x7f9c52ec5e18>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
process-cli-arg.custom.ls: calling handler
<awscli.argprocess.ParamShorthandParser object at 0x7f9c52e5c828>
2017-10-25 01:00:15,734 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.custom.ls.anonymous: calling handler <function uri_param at
0x7f9c52ec5e18>
2017-10-25 01:00:15,734 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: env
2017-10-25 01:00:15,734 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: assume-role
2017-10-25 01:00:15,734 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: shared-credentials-file
2017-10-25 01:00:15,735 - MainThread - botocore.credentials - INFO - Found
credentials in shared credentials file: ~/.aws/credentials
2017-10-25 01:00:15,735 - MainThread - botocore.loaders - DEBUG - Loading
JSON file: /usr/lib/python3/dist-packages/botocore/data/endpoints.json
2017-10-25 01:00:15,738 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/lib/python3/dist-packages/botocore/data/s3/2006-03-01/service-2.json
2017-10-25 01:00:15,744 - MainThread - botocore.hooks - DEBUG - Event
creating-client-class.s3: calling handler <function
add_generate_presigned_post at 0x7f9c532a1378>
2017-10-25 01:00:15,744 - MainThread - botocore.hooks - DEBUG - Event
creating-client-class.s3: calling handler <function
add_generate_presigned_url at 0x7f9c532a1158>
2017-10-25 01:00:15,744 - MainThread - botocore.args - DEBUG - The s3
config key is not a dictionary type, ignoring its value of: None
2017-10-25 01:00:15,747 - MainThread - awscli.clidriver - DEBUG - Exception
caught in main()
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 200, in
main
    return command_table[parsed_args.command](remaining, parsed_args)
  File "/usr/lib/python3/dist-packages/awscli/customizations/commands.py",
line 190, in __call__
    parsed_globals)
  File "/usr/lib/python3/dist-packages/awscli/customizations/commands.py",
line 187, in __call__
    return self._run_main(parsed_args, parsed_globals)
  File
"/usr/lib/python3/dist-packages/awscli/customizations/s3/subcommands.py",
line 455, in _run_main
    super(ListCommand, self)._run_main(parsed_args, parsed_globals)
  File
"/usr/lib/python3/dist-packages/awscli/customizations/s3/subcommands.py",
line 441, in _run_main
    parsed_globals.verify_ssl)
  File
"/usr/lib/python3/dist-packages/awscli/customizations/s3/subcommands.py",
line 434, in get_client
    config=config)
  File "/usr/lib/python3/dist-packages/botocore/session.py", line 836, in
create_client
    client_config=config, api_version=api_version)
  File "/usr/lib/python3/dist-packages/botocore/client.py", line 71, in
create_client
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/usr/lib/python3/dist-packages/botocore/client.py", line 283, in
_get_client_args
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/usr/lib/python3/dist-packages/botocore/args.py", line 79, in
get_client_args
    timeout=(new_config.connect_timeout, new_config.read_timeout))
  File "/usr/lib/python3/dist-packages/botocore/endpoint.py", line 275, in
create_endpoint
    proxies = self._get_proxies(endpoint_url)
  File "/usr/lib/python3/dist-packages/botocore/endpoint.py", line 289, in
_get_proxies
    return get_environ_proxies(url)
TypeError: get_environ_proxies() missing 1 required positional argument:
'no_proxy'
2017-10-25 01:00:15,747 - MainThread - awscli.clidriver - DEBUG - Exiting
with rc 255

get_environ_proxies() missing 1 required positional argument: 'no_proxy'

#873179#15
Date:
2017-10-24 14:08:02 UTC
From:
To:
I believe this should be linked to a bug with botocore. The pip3 version of
awscli pulls in botocore 1.7.34 and works properly on the same system.