error 128: clean filter 'filter_name' failed

In order to use git with my Jupyter notebooks, I used jq (https://stedolan.github.io/jq/download/) to create a filter, call it 'clean_ipynb', following the instructions on http://timstaley.co.uk/posts/making-git-and-jupyter-notebooks-play-nice/. While this does make Git and Jupyter notebooks work fine together, I've been having many issues with Sourcetree. In particular, every time I open a repo containing a Jupyter notebook I get an error: 

'git status' failed with code 128:'jq --indent 1         '(.cells[] | select(has("outputs")) | .outputs) = []          | (.cells[] | select(has("execution_count")) | .execution_count) = null          | .metadata = {"language_info": {"name": "python", "pygments_lexer": "ipython2"}}         | .cells[].metadata = {}         ': jq: command not found

error: external filter jq --indent 1         '(.cells[] | select(has("outputs")) | .outputs) = []          | (.cells[] | select(has("execution_count")) | .execution_count) = null          | .metadata = {"language_info": {"name": "python", "pygments_lexer": "ipython2"}}         | .cells[].metadata = {}         ' failed -1

error: external filter jq --indent 1         '(.cells[] | select(has("outputs")) | .outputs) = []          | (.cells[] | select(has("execution_count")) | .execution_count) = null          | .metadata = {"language_info": {"name": "python", "pygments_lexer": "ipython2"}}         | .cells[].metadata = {}         ' failed

fatal: src/file.ipynb: clean filter 'clean_ipynb' failed

Can you please help me fix this? All git commands are working fine, and I'm using System Git with Sourcetree, so I'm not sure where this could be coming from. Thanks!

1 answer

I fixed the issue by fixing the permission settings with jq. It wasn't a Sourcetree error! Thanks.

What exactly did you do to fix the permission settings with jq? I'm facing the exact same problem with Sourcetree right now.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

570 views 1 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you