vscode-python: Running debugger under `conda` fails to load `_sqlite3`
Issue Type: Bug
Hello,
After editing some documents in a repository, staging the changes, adding a commit message, and then trying to commit, I get an error with the following Command output.
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
Traceback (most recent call last):
File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\__main__.py", line 1, in <module>
from pre_commit.main import main
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\main.py", line 13, in <module>
from pre_commit.commands.autoupdate import autoupdate
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\commands\autoupdate.py", line 20, in <module>
from pre_commit.store import Store
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\store.py", line 4, in <module>
import sqlite3
File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
Traceback (most recent call last):
File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\me\Anaconda3\envs\myenv\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\__main__.py", line 1, in <module>
from pre_commit.main import main
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\main.py", line 13, in <module>
from pre_commit.commands.autoupdate import autoupdate
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\commands\autoupdate.py", line 20, in <module>
from pre_commit.store import Store
File "C:\Users\me\Anaconda3\envs\myenv\lib\site-packages\pre_commit\store.py", line 4, in <module>
import sqlite3
File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "C:\Users\me\Anaconda3\envs\myenv\lib\sqlite3\dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.
I did try importing those same python modules in a python session in a terminal (in the same anaconda environment) and I did not get any issue.
As far as I can tell, this is only happening one of the two workspaces I normally use.
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:40:02.816Z) OS version: Windows_NT x64 10.0.19042 Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz (8 x 1690) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.73GB (5.55GB free) |
Process Argv | –crash-reporter-id c4587ea1-65de-4590-a2c4-cb48d86b4f8b |
Screen Reader | no |
VM | 0% |
Extensions (15)
Extension | Author (truncated) | Version |
---|---|---|
languagetool-linter | dav | 0.19.0 |
typescript-notebook | don | 2.0.6 |
gitlens | eam | 11.7.0 |
gitlab-workflow | Git | 3.40.1 |
todo-tree | Gru | 0.0.215 |
gitlab-mr | jas | 1.4.3 |
git-graph | mhu | 1.30.0 |
python | ms- | 2021.12.1559732655 |
vscode-pylance | ms- | 2022.1.1 |
jupyter | ms- | 2021.11.1001550889 |
jupyter-keymap | ms- | 1.0.0 |
jupyter-renderers | ms- | 1.0.4 |
powershell | ms- | 2021.12.0 |
rust | rus | 0.7.8 |
rewrap | stk | 1.15.4 |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30421291
pythonvs932:30410667
vscop804:30404766
vscop940:30404999
vsrem710:30416614
vsccppwtstudy:30421978
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (7 by maintainers)
@lszomoru I’ve gone ahead and transferred the issue to the vscode-python repo.
@Astlaan please let us know if you are still having this issue as we have completely reworked our conda support since you last reported anything.