Thomas d'Hooghe
08/28/2024, 12:54 PMkedro ipython
causes SystemExit: 1 (see thread for Traceback)Thomas d'Hooghe
08/28/2024, 12:54 PM╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/Thomas_dHooghe/repos/xxx/pricing-aa/.venv/lib/python3.11/site-packages/IP │
│ ython/core/shellapp.py:435 in _run_startup_files │
│ │
│ 432 │ │ self.log.debug("Running startup files from %s...", startup_dir) │
│ 433 │ │ try: │
│ 434 │ │ │ for fname in sorted(startup_files): │
│ ❱ 435 │ │ │ │ self._exec_file(fname) │
│ 436 │ │ except: │
│ 437 │ │ │ self.log.warning("Unknown error in handling startup files:") │
│ 438 │ │ │ self.shell.showtraceback() │
│ │
│ /Users/Thomas_dHooghe/repos/xxx/pricing-aa/.venv/lib/python3.11/site-packages/IP │
│ ython/core/shellapp.py:403 in _exec_file │
│ │
│ 400 │ │ │ │ │ │ │ │ │ │ │ │ │ shell_futures=shell_futures) │
│ 401 │ │ │ │ │ else: │
│ 402 │ │ │ │ │ │ # default to python, even without extension │
│ ❱ 403 │ │ │ │ │ │ self.shell.safe_execfile(full_filename, │
│ 404 │ │ │ │ │ │ │ │ │ │ │ │ self.shell.user_ns, │
│ 405 │ │ │ │ │ │ │ │ │ │ │ │ shell_futures=shell_futures, │
│ 406 │ │ │ │ │ │ │ │ │ │ │ │ raise_exceptions=True) │
│ │
│ /Users/Thomas_dHooghe/repos/xxx/pricing-aa/.venv/lib/python3.11/site-packages/IP │
│ ython/core/interactiveshell.py:2932 in safe_execfile │
│ │
│ 2929 │ │ with prepended_to_syspath(dname), self.builtin_trap: │
│ 2930 │ │ │ try: │
│ 2931 │ │ │ │ glob, loc = (where + (None, ))[:2] │
│ ❱ 2932 │ │ │ │ py3compat.execfile( │
│ 2933 │ │ │ │ │ fname, glob, loc, │
│ 2934 │ │ │ │ │ self.compile if shell_futures else None) │
│ 2935 │ │ │ except SystemExit as status: │
│ │
│ /Users/Thomas_dHooghe/repos/xxx/pricing-aa/.venv/lib/python3.11/site-packages/IP │
│ ython/utils/py3compat.py:55 in execfile │
│ │
│ 52 │ loc = loc if (loc is not None) else glob │
│ 53 │ with open(fname, "rb") as f: │
│ 54 │ │ compiler = compiler or compile │
│ ❱ 55 │ │ exec(compiler(f.read(), fname, "exec"), glob, loc) │
│ 56 │
│ 57 │
│ 58 PYPY = platform.python_implementation() == "PyPy" │
│ │
│ /Users/Thomas_dHooghe/.ipython/profile_default/startup/00-databricks-init-a5acf3baa440a896fa364d │
│ 183279094b.py:383 in <module> │
│ │
│ 380 │ │
│ 381 │ print(sys.modules[__name__]) │
│ 382 │ if not load_env_from_leaf(os.getcwd()): │
│ ❱ 383 │ │ sys.exit(1) │
│ 384 │ cfg = LocalDatabricksNotebookConfig() │
│ 385 │ create_and_register_databricks_globals() │
│ 386 │ register_magics(cfg)
Nok Lam Chan
08/28/2024, 3:10 PMclick
(and how CLI should works)Nok Lam Chan
08/28/2024, 3:10 PMNok Lam Chan
08/28/2024, 3:10 PMNok Lam Chan
08/28/2024, 3:11 PMThomas d'Hooghe
08/28/2024, 3:11 PMNok Lam Chan
08/28/2024, 3:11 PMNok Lam Chan
08/28/2024, 3:12 PMkwargs["standalone_mode"] = not interactivehttps://github.com/kedro-org/kedro-starters/blob/0.19.8/databricks-iris/%7B%7B%20c[…]D/src/%7B%7B%20cookiecutter.python_package%20%7D%7D/__main__.py This is the change that making CLI stop throwing sys.exit at the end
Thomas d'Hooghe
08/28/2024, 3:12 PMNok Lam Chan
08/28/2024, 3:12 PM__main__.py
?Nok Lam Chan
08/28/2024, 3:13 PMThomas d'Hooghe
08/28/2024, 3:13 PM_main_.py
at all so it seemsNok Lam Chan
08/28/2024, 3:14 PMkedro ipython
instead of kedro run
, I missed that at the beginning.Nok Lam Chan
08/28/2024, 3:14 PMkedro ipython
on Databricks? (or how are you running this)?Thomas d'Hooghe
08/28/2024, 3:14 PMThomas d'Hooghe
08/28/2024, 3:15 PMNok Lam Chan
08/28/2024, 3:16 PMNok Lam Chan
08/28/2024, 3:16 PMNok Lam Chan
08/28/2024, 3:16 PMJuan Luis
08/28/2024, 3:50 PM/Users/Thomas_dHooghe/.ipython/profile_default/startup/00-databricks-init-a5acf3baa440a896fa364d │
│ 183279094b.py
right, I think this comes from the Databricks pluginJuan Luis
08/28/2024, 3:51 PM/Users/Thomas_dHooghe/.ipython/profile_default/startup/00-databricks-init-a5acf3baa440a896fa364d183279094b.py
, the problem goes awayThomas d'Hooghe
08/28/2024, 4:43 PM