databricks-vscode
databricks-vscode copied to clipboard
[BUG] 00-databricks-init.py breaks ipython
Describe the bug
I'm not sure exactly what triggers the 00-databricks-init-<hash>.py file to get created in ~/.ipython/profile_default/startup/, but when it's there, I get a long stack trace when I try to start ipython in another venv/other project/outside of vscode. I keep deleting it and it keeps coming back at some point while working on a project that uses the extension.
Part of the stack trace:
File ~/.ipython/profile_default/startup/00-databricks-init-cdb6174794c74fbc909de1ce43bfe286.py:632
630 import os
631 if not os.environ.get("DATABRICKS_EXTENSION_UNIT_TESTS"):
--> 632 setup()
File ~/.ipython/profile_default/startup/00-databricks-init-cdb6174794c74fbc909de1ce43bfe286.py:43, in logErrorAndContinue.<locals>.wrapper(*args, **kwargs)
40 @functools.wraps(f)
41 def wrapper(*args, **kwargs):
42 try:
---> 43 return f(*args, **kwargs)
44 except Exception as e:
45 logError(f.__name__, e)
File ~/.ipython/profile_default/startup/00-databricks-init-cdb6174794c74fbc909de1ce43bfe286.py:610, in setup()
607 os.environ["GRPC_VERBOSITY"] = "NONE"
609 if not load_env_from_leaf(os.getcwd()):
--> 610 sys.exit(1)
611 cfg = LocalDatabricksNotebookConfig()
613 # disable build-in progress bar
To Reproduce Steps to reproduce the behavior:
- Do whatever it is that creates this file. I tried a few things but I'm not sure specifically what it is.
- In a terminal, create a new venv somewhere, activate it,
pip install ipython, then startipython - See error
Screenshots If applicable, add screenshots to help explain your problem.
System information:
- Paste the output ot the
Help: Aboutcommand (CMD-Shift-P).
Version: 1.100.1 (Universal)
Commit: 91fa95bccb027ece6a968589bb1d662fa9c8e170
Date: 2025-05-09T15:43:50.040Z (6 days ago)
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.4.0
- Databricks Extension Version
2.9.4Databricks Extension Logs N/A, the problem isn't when I'm using the extension, it's a problem caused by the extension in contexts where I'm not using it.
Additional context Add any other context about the problem here.