You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For anyone else in the same boat: It seems Sourcetree doesn't use the same PATH as the regular shell. (Similar to the issue w/ using jq in launchd described here: https://stackoverflow.com/questions/23598328/using-jq-to-parse-json-in-launchd)
I fixed the same issue just by providing the full path to jq in the .gitconfig file defining the clean filter (i.e., using /usr/local/bin/jq instead of just jq).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.