Skip to content

Doesn't cope with UTF-8 paths. #1645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RokeJulianLockhart opened this issue Aug 4, 2024 · 3 comments
Closed

Doesn't cope with UTF-8 paths. #1645

RokeJulianLockhart opened this issue Aug 4, 2024 · 3 comments

Comments

@RokeJulianLockhart
Copy link

I've had issues in some paths that contain non-ASCII characters. Because the logs during debug would always mention IO decodement errata, I created an evaluation directory at the path:

/home/RokeJulianLockhart/Documents/  [-]	`{title: "test_title",	id: "test_data"}`{.JSON5}.dir

...containing a multitude of characters in its file name to ascertain whether that was the cause. It certainly appears to be:

RokeJulianLockhart@sayw4i:~/Documents/  [-]     `{title: "test_title",  id: "test_data"}`{.JSON5}.dir$  /usr/bin/env /usr/bin/python3 /home/RokeJulianLockhart/.vscode-insiders/extensions/ms-python.debugpy-2024.11.2024080201-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 33439 -- /home/RokeJulianLockhart/Documents/\ \ \[-\]\    \`\{title\:\ \"test_title\"\,\  id\:\ \"test_data\"\}\`\{.JSON5\}.dir/\`\{title:\ \"test_title\",id:\ \"test_data\"\}\`\{.JSON5\}.dir/core.py 
Traceback (most recent call last):
  File "/usr/lib64/python3.12/runpy.py", line 198, in _run_module_as_main
    return _run_code(code, main_globals, None,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/runpy.py", line 88, in _run_code
    exec(code, run_globals)
  File "/home/RokeJulianLockhart/.vscode-insiders/extensions/ms-python.debugpy-2024.11.2024080201-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/home/RokeJulianLockhart/.vscode-insiders/extensions/ms-python.debugpy-2024.11.2024080201-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/home/RokeJulianLockhart/.vscode-insiders/extensions/ms-python.debugpy-2024.11.2024080201-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/home/RokeJulianLockhart/.vscode-insiders/extensions/ms-python.debugpy-2024.11.2024080201-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 320, in run_path
    code, fname = _get_code_from_file(run_name, path_name)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/RokeJulianLockhart/.vscode-insiders/extensions/ms-python.debugpy-2024.11.2024080201-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 289, in _get_code_from_file
    with io_open_code(decoded_path) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/RokeJulianLockhart/Documents/  [-]\t`{title: "test_title",\tid: "test_data"}`{.JSON5}.dir/`{title: "test_title",id: "test_data"}`{.JSON5}.dir/core.py'
RokeJulianLockhart@sayw4i:~/Documents/  [-]     `{title: "test_title",  id: "test_data"}`{.JSON5}.dir$

The directory contained 1 file named "core.py".

@rchiodo
Copy link
Contributor

rchiodo commented Sep 25, 2024

Is this the directory you created?

~/Documents/  [-]     `{title: "test_title",  id: "test_data"}`{.JSON5}.dir

And that got translated to this somehow?

/home/RokeJulianLockhart/Documents/  [-]\t`{title: "test_title",\tid: "test_data"}`{.JSON5}.dir/

It looks like it turned the spaces into tabs

@rchiodo
Copy link
Contributor

rchiodo commented Sep 25, 2024

Closing as a dupe of #1671

@rchiodo rchiodo closed this as completed Sep 25, 2024
@RokeJulianLockhart
Copy link
Author

#1645 (comment)

@rchiodo, apologies for the duplicate. I assume that I forgot that I had already filed this one.

#1645 (comment)

Perhaps it would be better to close this as invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants