# Fix AWS git-remote-codecommit SyntaxWarning / Namespace cli_binary_format

- URL: https://www.heissenberger.at/en/blog/fix-aws-git-remote-codecommit-syntaxwarning-namespace-cli-binary-format/
- Language: en
- Published: 2020-05-05
- Tags: AWS, CodeCommit, MacOS, Brew, Git, FixIt

> Workaround for the OSX credential Helper by replacing broken python libaries

Switching from the workaround for the OSX credential Helper 403 Error I tried the AWS git credential helper and could not got it working without fixing some problems.

## The Problem

After the installation with `brew install git-remote-codecommit` using git will throw the following warnings:

```bash
$ git pull
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: “is” with a literal. Did you mean “==”?
if x is 0 or x is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: “is” with a literal. Did you mean “==”?
if x is 0 or x is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: “is” with a literal. Did you mean “==”?
elif y is 0 or y is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: “is” with a literal. Did you mean “==”?
elif y is 0 or y is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:260: SyntaxWarning: “is” with a literal. Did you mean “==”?
if original_result is 0:
‘Namespace’ object has no attribute ‘cli_binary_format’
Already up to date.
```

The problem is related to the outdated versions of `jmespath`and `awscli` bundled with `git-remote-codecommit`.

## The Fix

will be fixed when this pull request gets merged: https://github.com/Homebrew/homebrew-core/pull/52424

```bash
sudo cp -rp /usr/local/Cellar/awscli/2.0.10/libexec/lib/python3.8/site-packages/awscli /usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages
sudo cp -rp /usr/local/Cellar/awscli/2.0.10/libexec/lib/python3.8/site-packages/jmespath /usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages
```

If the copy breaks check your local versions of awscli (2.0.10) and codecommit (1.13) and adapt the path to your enviroment.

[Write a response on Medium](https://medium.com/p/b8fe6a96fae/responses/show)
