[SOLVED] CI keeps saying to install hooks again

I’m having some trouble with a repeated error message despite my attempts to remedy it.

I’ve tried a few extra pushes to GitHub, running nbdev_install_hooks again, running nbdev_export and nbdev_prepare, and running pip install -U nbdev… making trivial changes to nb files just to trigger a new CI run, running the above nbdev_ commands again before doing gid add, git commit, git push, …

But i keep getting the same errors about needing to install hooks, again.

Here’s an example log of my latest Actions attempt for which I added a single space to two nb files before running all the above nbdev_... commands and commiting:

+ echo 'Check that strip out was unnecessary'
Check that strip out was unnecessary
+ git status -s
 M 01_datasets.ipynb
 M 05_hpc.ipynb
++ git status --porcelain -uno
+ [[ -n  M 01_datasets.ipynb
 M 05_hpc.ipynb ]]
+ git status -uno
On branch dev
Your branch is up to date with 'origin/dev'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   01_datasets.ipynb
	modified:   05_hpc.ipynb

no changes added to commit (use "git add" and/or "git commit -a")
+ echo -e '!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_hooks'
!!! Detected unstripped out notebooks
!!!Remember to run nbdev_install_hooks
++ pip install -U nbdev
+ echo -e 'This error can also happen if you are using an older version of nbdev relative to what is in CI.  Please try to upgrade nbdev with the command Requirement already satisfied: nbdev in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (2.3.12)
This error can also happen if you are using an older version of nbdev relative to what is in CI.  Please try to upgrade nbdev with the command Requirement already satisfied: nbdev in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (2.3.12)

List of recent Actions are here: Actions · drscotthawley/aeiou · GitHub

Commands I’ve run between these:

pip install -U nbdev
nbdev_install_hooks
nbdev_export
nbdev_prepare
git add nbs/*.ipynb <repo>/*.py 
git commit
git push

What else can one do to resolve this error? Thanks.

1 Like

One more thing I tried: nbdev_clean. That seems to have modified the two notebook files in the above log.

Commiting & pushing those changes, the CI completes. :partying_face:

1 Like

I think that’s why the tutorial says to use nbdev_prepare before commiting, as that is calling nbdev_clean?

I said in my original post that I ran nbdev_prepare