`incompatible copy of pydevd already imported` when running omegaconf
Describe the bug warning appears when running omegaconf:
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
/root/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/_vendored/force_pydevd.py:18: UserWarning: incompatible copy of pydevd already imported:
/venv/lib/python3.11/site-packages/pydevd_plugins/extensions/pydevd_plugin_omegaconf.py
warnings.warn(msg + ':\n {}'.format('\n '.join(_unvendored)))
To Reproduce run anything with omegaconf import
Expected behavior this wanring shouldn't happen
Additional context
- [X] OmegaConf version: omegaconf==2.3.0
- [X] Python version: 3.11.9
- [X] Operating system: ubuntu 22.04 in docker
- [X] Please provide a minimal repro
Anyone has solved this somehow? Getting omegaconf via hydra 1.3.2 and having that same annoying warning. (also 2.3.0)
tried setting OC_PYDEVD_RESOLVER:
But no change. I dont think omgeconf should force any pydev on the user, at least by default the import should be turned off...
Found a solution, uninstall omegaconf, pydevd and debugpy, then delete folder /venv/lib/python3.11/site-packages/pydevd_plugins/extensions and install uninstalled libraries again (I guess that omegaconf should be installed in the end to catch up with installed pydevd and debugpy)
Found a solution, uninstall omegaconf, pydevd and debugpy, then delete folder /venv/lib/python3.11/site-packages/pydevd_plugins/extensions and install uninstalled libraries again (I guess that omegaconf should be installed in the end to catch up with installed pydevd and debugpy)
I've encountered the same issue as well, but this solution doesn't work for me. Do you have any ideas?
same here, any solutions?
I am getting this issue as well now. I opened an issue with ms-python.debugpy, but they said the fault was on omegaconf.
This is a serious issue as it prevents debugging entirely for me. Is there anything I can do to help look into this?
launch your multiprocess debugging with this env to silence the warning:
PYTHONWARNINGS='ignore::UserWarning:debugpy._vendored.force_pydevd'
in launch.json this looks like:
"env": {
"PYTHONWARNINGS": "ignore::UserWarning:debugpy._vendored.force_pydevd"
}
or comment-out the warning in VSCode's force_pydevd.py source code:
find "$HOME/.vscode-server/extensions" -path "*ms-python.debugpy*/bundled/libs/debugpy/_vendored/force_pydevd.py" -exec sed -i 's/^\(\s*\)\(.*warnings\.warn.*_unvendored.*\)$/\1# \2/' {} \;
or delete pydevd_plugin_omegaconf.py (I'm using sudo rm here in case it's in dist-packages, but if yours is in site-packages you can just use rm):
pip show omegaconf | awk '/^Location/ {printf("%s/%s\n", $2, "pydevd_plugins/extensions/pydevd_plugin_omegaconf.py")}' | xargs -n 1 sudo rm
For others out there, I ended up going with the deletion of the pydevd_plugin_omegaconf.py. I recognize that this may not work for all, but it worked for me and I am able to debug again.
I think this issue still remains for the developers if they can fix it, I'm sure the user community would be grateful.