I am trying to run a project that was working fine some weeks ago but appently VSCode/Python extension is not recognizing /special characteres on folder/subfolder path.
The error on execution is the bellow:
cd "/home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia \[GT5\]" ; /usr/bin/env /bin/python /home/lab/.vscode/extensions/ms-python.python-2022.6.2/pythonFiles/lib/python/debugpy/launcher 33419 -- "/home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia \[GT5\]/Process/generate_report.py"
bash: cd: /home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia \[GT5\]: No such file or directory
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/lab/.vscode/extensions/ms-python.python-2022.6.2/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
cli.main()
File "/home/lab/.vscode/extensions/ms-python.python-2022.6.2/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
run()
File "/home/lab/.vscode/extensions/ms-python.python-2022.6.2/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "/usr/lib/python3.8/runpy.py", line 264, in run_path
code, fname = _get_code_from_file(run_name, path_name)
File "/usr/lib/python3.8/runpy.py", line 234, in _get_code_from_file
with io.open_code(decoded_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia \\[GT5\\]/Process/generate_report.py'
See that the error is a "FileNotFound", even trying to execute the command by python '/home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia \\[GT5\\]/Process/generate_report.py' the error still. The correct path should be:
"/home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia [GT5]/Process/generate_report.py"
Apparently there is a absolute path generation error.
VS Code version: Code 1.67.1 (da15b6fd3ef856477bf6f4fb29ba1b7af717770d, 2022-05-06T12:39:22.915Z)
OS version: Linux x64 5.13.0-41-generic
Restricted Mode: No
Issue Type: Bug
I am trying to run a project that was working fine some weeks ago but appently VSCode/Python extension is not recognizing/special characteres on folder/subfolder path.
The error on execution is the bellow:
See that the error is a "FileNotFound", even trying to execute the command by
python '/home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia \\[GT5\\]/Process/generate_report.py'
the error still. The correct path should be:"/home/lab/Documents/UNICAMP/Campus Sustentável/Data analytics/Uso final da energia [GT5]/Process/generate_report.py"
or
/home/lab/Documents/UNICAMP/Campus\ Sustentável/Data\ analytics/Uso\ final\ da\ energia\ [GT5]/Process/generate_report.py
Apparently there is a absolute path generation error.
VS Code version: Code 1.67.1 (da15b6fd3ef856477bf6f4fb29ba1b7af717770d, 2022-05-06T12:39:22.915Z) OS version: Linux x64 5.13.0-41-generic Restricted Mode: No
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 3464)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|2, 3, 2| |Memory (System)|15.53GB (6.01GB free)| |Process Argv|--unity-launch --crash-reporter-id b1cf6861-45ee-48e6-a61c-8956377084d3| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|x11|
Extensions (20)
Extension|Author (truncated)|Version ---|---|--- doxdocgen|csc|1.4.0 better-cpp-syntax|jef|1.15.13 git-graph|mhu|1.30.0 language-gettext|mro|0.2.0 python|ms-|2022.6.2 vscode-pylance|ms-|2022.5.1 jupyter|ms-|2022.4.1021342353 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.6 remote-containers|ms-|0.234.0 remote-ssh|ms-|0.80.0 remote-ssh-edit|ms-|0.80.0 remote-wsl|ms-|0.66.2 cmake-tools|ms-|1.10.5 cpptools|ms-|1.9.8 cpptools-extension-pack|ms-|1.2.0 hexeditor|ms-|1.9.6 live-server|ms-|0.2.12 platformio-ide|pla|2.4.3 cmake|twx|0.0.17 (1 theme extensions excluded)A/B Experiments
``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 pythonvspyl392:30443607 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 pythonvsnew555:30457759 vscscmwlcmt:30465135 cppdebug:30475216 vscaac:30438847 vsclangdc:30486549 ```