Skip to content
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

Temp file paths can be inconsistent with debugpy #784

Closed
kycutler opened this issue Oct 8, 2021 · 1 comment · Fixed by #838
Closed

Temp file paths can be inconsistent with debugpy #784

kycutler opened this issue Oct 8, 2021 · 1 comment · Fixed by #838

Comments

@kycutler
Copy link
Contributor

kycutler commented Oct 8, 2021

The user directory on my Windows machine is C:\Users\kycutler.NORTHAMERICA. However the temporary file location returned by tempfile.gettempdir() is shortened to C:\Users\KYCUTL~1.NOR\AppData\Local\Temp. Thus the shortened version is used in tmpFilePrefix and results from dumpCell:

image

image

However, debugpy converts file paths to their long form, so the temp file paths are different:

image

This causes issues in the frontend since we can not simply check for equality between the paths returned from debugpy and those returned from dumpCell or constructed using tmpFilePrefix.

@kycutler
Copy link
Contributor Author

kycutler commented Nov 23, 2021

I have also witnessed some issues with inconsistent path separators in some environments.

Notice the mix of forward- and back-slashes here:
image

But the paths received from debugpy (e.g. stacktrace) are all back slashes:
image

It's simple enough to normalize these in the frontend, but ideally that shouldn't be necessary.

These are from a fresh conda environment using conda create -n envname ipykernel notebook. I'm not sure why the path separators are different from in my original post, other than using different versions. Whoops, it looks like I was actually connected to xpython in the original post... both have the short path issue but it looks like only ipython has the inconsistent path separators as well.

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

Successfully merging a pull request may close this issue.

1 participant