Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Namespace' object has no attribute 'cli_binary_format' #119

Open
aberezin-acertus opened this issue Mar 23, 2020 · 10 comments
Open

'Namespace' object has no attribute 'cli_binary_format' #119

aberezin-acertus opened this issue Mar 23, 2020 · 10 comments

Comments

@aberezin-acertus
Copy link

I am running saws under py3.6 under virtualenv with aws CLI2 (which I need for sso). I am getting the following error for any aws command I try:
'Namespace' object has no attribute 'cli_binary_format'

I tried explicitly setting that attribute in the default section of my .aws/config file but that doesn't help. Note that setting this attribute is a new feature of CLI2

@keithknott26
Copy link

I'm also having this issue - bug in python or just incompatible with my python version?

image

@cam8001
Copy link

cam8001 commented Apr 25, 2020

Did you guys install version 2 of the aws cli using the packaged module?

https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

It 'embeds' its own python according to the docs. I'm not sure how/if saws interacts with it.

@domainoverflow
Copy link

Same here.

@plygrnd
Copy link

plygrnd commented Jun 23, 2021

This issue is also present in aws-shell, for the same reason. To fix this, both saws and aws-shell need to invoke the Python binary embedded in the CLI.

@TRiggAtGM
Copy link

This issue is also present in aws-shell, for the same reason. To fix this, both saws and aws-shell need to invoke the Python binary embedded in the CLI.

Is this guidance for how a SAWS user can resolve this issue, or is it guidance for how SAWS development can resolve this issue? If the former I'm not actually clear on what I can do as a SAWS user to get this rolling

@jamnaughty
Copy link

Have the same issue? Any fix for this?

@jamnaughty
Copy link

Solved using pip install -U awscli saws

@billmetangmo
Copy link

billmetangmo commented Oct 27, 2022

If you used to use pipx, to fix the issue you need one another command:

pipx install saws
pipx runpip saws install aws

@anilkhichar
Copy link

awscli-2 installed it's own python, hence below worked for me on MacOS:

/usr/local/Cellar/awscli/2.11.23/libexec/bin/pip install saws

Note: To find the awscli installed location, I used below:

brew info awscli | grep awscli
OR
brew info awscli | grep Cellar/awscli 

@pegr69
Copy link

pegr69 commented Aug 24, 2023

I have had this issue for several days now, turns out when I call aws cli from python somewhere along the line boto3 adds AWS_DATA_PATH to the env.
This confuses aws cli and causes the issue, I just created a copy of the env and removed the AWS_DATA_PATH. problem sorted.

    env = os.environ
    # Remove injected invalid awsdatapath
    env.pop('AWS_DATA_PATH')
    
    os.execvpe('aws',['aws', 's3', 'ls'],env)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests