I am using on my iMac VS Code for scripting with Python in a conda environment. Every time I start the debugger I get the message I mentioned in the title. My project is in the following directory: ~/Documents/Universität/Some University/Master/Some Semester/git_project
First of all I choose on the left bar the correct project folder so I am choosing „git_project“. When I start running the script it is running correctly without any issues. But when I start debugging by just clicking on the bug with start sign on the upper right corner my debugger is directly crashing with the following error message.
Somehow debugpy is questioning what folders are in documents and prints a list of them, for example ['Universität', 'Sonstiges', etc.]. Still, then it is printing the error, that 'universität' can not be found, of course, because I wrote it with capital letters and it is searching for universität with small letters. It is really annoying, I even deleted my whole machine and set everything new up, but I still get the same error. I also tried to run the debugger without conda installed on my machine and it still does not work. Does somebody know how to fix it?
Here the error message:
0.09s - pydev debugger: critical: unable to get real case for file. Details:
filename: /Users/"user"/Documents/Universität/...
drive: /
parts: ['users', "user", 'documents', 'universität', "..."]
(please create a ticket in the tracker to address this).
Traceback (most recent call last):
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 168, in _resolve_listing_parts
return _resolve_listing(resolved, iter(parts_in_lowercase))
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 158, in _resolve_listing
raise FileNotFoundError('Unable to find: %s in %s. Dir Contents: %s' % (
FileNotFoundError: Unable to find: universität in /Users/"user"/Documents. Dir Contents: ['.DS_Store', '.localized', 'skript.txt.docx', 'Programme', 'Schule', 'Sonstiges', 'Universität', 'Arbeit']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 173, in _resolve_listing_parts
return _resolve_listing(resolved, iter(parts_in_lowercase))
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 158, in _resolve_listing
raise FileNotFoundError('Unable to find: %s in %s. Dir Contents: %s' % (
FileNotFoundError: Unable to find: universität in /Users/"user"/Documents. Dir Contents: ['.DS_Store', '.localized', 'skript.txt.docx', 'Programme', 'Schule', 'Sonstiges', 'Universität', 'Arbeit']
0.00s - pydev debugger: critical: unable to get real case for file. Details:
filename: /Users/"user"/Documents/Universität/...
drive: /
parts: parts: ['users', "user", 'documents', 'universität', "..."]
(please create a ticket in the tracker to address this).
Traceback (most recent call last):
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 168, in _resolve_listing_parts
return _resolve_listing(resolved, iter(parts_in_lowercase))
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 158, in _resolve_listing
raise FileNotFoundError('Unable to find: %s in %s. Dir Contents: %s' % (
FileNotFoundError: Unable to find: universität in /Users/"user"/Documents. Dir Contents: ['.DS_Store', '.localized', 'skript.txt.docx', 'Programme', 'Schule', 'Sonstiges', 'Universität', 'Arbeit']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 173, in _resolve_listing_parts
return _resolve_listing(resolved, iter(parts_in_lowercase))
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 158, in _resolve_listing
raise FileNotFoundError('Unable to find: %s in %s. Dir Contents: %s' % (
FileNotFoundError: Unable to find: universität in /Users/"user"/Documents. Dir Contents: ['.DS_Store', '.localized', 'skript.txt.docx', 'Programme', 'Schule', 'Sonstiges', 'Universität', 'Arbeit']
0.12s - pydev debugger: critical: unable to get real case for file. Details:
filename: /Users/user/Documents/Universität/...
drive: /
parts: ['users', "user", 'documents', 'universität', "..."]
(please create a ticket in the tracker to address this).
Traceback (most recent call last):
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 625, in _original_file_to_client
return cache[filename]
KeyError: '/Users/"user"/Documents/Universität/...
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 168, in _resolve_listing_parts
return _resolve_listing(resolved, iter(parts_in_lowercase))
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 158, in _resolve_listing
raise FileNotFoundError('Unable to find: %s in %s. Dir Contents: %s' % (
FileNotFoundError: Unable to find: universität in /Users/"user"/Documents. Dir Contents: ['.DS_Store', '.localized', 'skript.txt.docx', 'Programme', 'Schule', 'Sonstiges', 'Universität', 'Arbeit']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 173, in _resolve_listing_parts
return _resolve_listing(resolved, iter(parts_in_lowercase))
File "/Users/"user"/.vscode/extensions/ms-python.python-2023.8.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_file_utils.py", line 158, in _resolve_listing
raise FileNotFoundError('Unable to find: %s in %s. Dir Contents: %s' % (
FileNotFoundError: Unable to find: universität in /Users/"user"/Documents. Dir Contents: ['.DS_Store', '.localized', 'skript.txt.docx', 'Programme', 'Schule', 'Sonstiges', 'Universität', 'Arbeit']
There where "user" is written is normally my username and some more folders are also replaced by me with "..."
I tried following:
- Checked in the python extension setting in VS Code following option: Python > Terminal: Execute in File Dir
- Created the launch.json file by clicking on the left bar to Run and Debug and clicked on create a launch.json file. (I did not really understand, what I should insert exactly insert in the program field. I have several scripts in this location so would the debugger just work for the specific file I add in program?
All infos/ suggestions are from VSCode Debug Mode sometimes does not work due to a PyDev FileNotFoundError - Reinstall the whole MacOS (add first Files an Folder from backup, then installing python by typing in terminal „python3“ (a window is opening where I get asked if I want to have developer tools, I click on yes) (I get Python 3.9.6 installed), then installing conda from Anaconda website, installing VS Code (Downloading it and move it to the application folder)
- Changed the folders name in the whole directory from capital to small starting letters
- Switched the character ä with ae (this worked)
Is it somehow possible to run the debugger without any issues even when you have chars like ä, ö and ü in the folders naming?