0

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?

Lysapala
  • 80
  • 9
  • related?: [pydev debugger: critical: unable to get real case for file #667](https://github.com/microsoft/debugpy/issues/667) – starball May 08 '23 at 08:14
  • Does this answer your question? [VSCode Debug Mode sometimes does not work due to a PyDev FileNotFoundError](https://stackoverflow.com/questions/67510784/vscode-debug-mode-sometimes-does-not-work-due-to-a-pydev-filenotfounderror) – starball May 08 '23 at 08:15
  • The first page does not really help. Currently I'm at work, I could post the exact error printing when I am at home. I will test the second suggestion at home. It is really strange because like I said, I don't really understand why debugpy is searching just for folders with small letters. I tried to change the launch.json file but it does also not work. I will try at home, if the extension option will work or not. – Lysapala May 08 '23 at 08:33
  • I have tested it now, the link you posted does not help. I changed the settings in the python extension but the error is still appearing. – Lysapala May 08 '23 at 21:54
  • [edit] to show _**exactly**_ what you tried, and link to where you got the info on what to try – starball May 08 '23 at 22:03
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Please see [how to ask](https://stackoverflow.com/help/how-to-ask). [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) – JialeDu May 09 '23 at 06:31
  • @Lysapala Any update of this issue? :) – Bowman Zhu-MSFT May 24 '23 at 09:35
  • No, unfortunately not. I changed now the whole naming of my paths. The issue was that VSCode was not able to recognize folders, which has the characters ä, ö and ü in their names so I replaced all of these to ae, oe and ue. I don't like it because usually these folders are used for storing my stuff from the university like pdf slides or exercises and this was the first time I needed to script something in python where I used VS Code for. It was the fastest and easiest solution for me. – Lysapala May 25 '23 at 14:49

0 Answers0