kedro: Git fatal error when using a Kedro project inside directory without an initialised repo
Description
Kedro Docs contains a pandas Iris example project which has Python 3.6 in the requirements file, which does not execute on newer Apple M1 chipsets. Attempting to execute it on an M1-compatible version of Python 3.8.13 via kedro run results in:
kedro.framework.session.store - INFO - `read()` not implemented for `BaseSessionStore`. Assuming empty store.
fatal: Needed a single revision
Context
Attempt the docs instructions on https://kedro.readthedocs.io/en/stable/get_started/example_project.html on an Apple M1.
Steps to Reproduce
Execute the following on an Apple M1:
kedro new --starter=pandas-iris
cd pandas-iris
git init
pip install -r src/requirements.txt
kedro run
Expected Result
Run without fatal errors.
Actual Result
kedro.framework.session.store - INFO - `read()` not implemented for `BaseSessionStore`. Assuming empty store.
fatal: Needed a single revision
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
- Kedro version used:
0.17.7 - Python version used (
python -V):3.8.13 - Operating system and version:
macOS 12.3
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (11 by maintainers)
Just to understand where we stand on this… This isn’t actually related to Apple M1 chips at all, right? It’s just what happens if you do
kedro runin a directory which hasn’t had git commit yet?@datajoely That’s what initially gave me pause, as I didn’t catch that the
fatalerror was actually a benign INFO log. Without diving into the codebase, it just wasn’t immediately clear the error was bubbling messaging up from an expected git state.Okay so I understand this better now - the exception handler does successfully catch the error on the python side, but the subprocess will still cause the quite scary error message to be presented:
We could pre-check this by doing a couple of things:
.gitin foldersubprocess.check_outputwe could redirect thestderrtostdoutlike shown in this example.Some users still experiencing issues - still investigating
That is a fair error that got fixed in 0.18. As a workaround, add
jupyter-console<6.4.3 # 6.4.3 requires jupyter_client>=7.0as mentioned in 1356.And on your earlier error, would be great to hear if you were able to find a fix. If not which version of git are you using?