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

[bug] Inspect fails to run in the vs code python 3 devcontainer #665

Closed
domdomegg opened this issue Oct 7, 2024 · 2 comments · Fixed by #761
Closed

[bug] Inspect fails to run in the vs code python 3 devcontainer #665

domdomegg opened this issue Oct 7, 2024 · 2 comments · Fixed by #761

Comments

@domdomegg
Copy link
Contributor

domdomegg commented Oct 7, 2024

When starting up, Inspect sets up a folder to help store temporary files. It uses the https://github.com/tox-dev/platformdirs library (specifically the user_runtime_path function) to find an appropriate place to store these files.

On Linux systems without $XDG_RUNTIME_DIR set, this returns a path in /run/user. Unfortunately in VS Code dev containers, there is no /run/user folder in the default Python container.

Upstream bug: tox-dev/platformdirs#315

Proposed next steps

  • Wait to see if the upstream bug is resolved in a reasonable time. It looks like it's already got some traction so I think this should be fixed fine. If it isn't, then we could explore patching this on the Inspect end of things.
  • In the mean time, suggest the workaround of setting the XDG_RUNTIME_DIR environment variable manually to a folder with read/write permissions.
@jjallaire-aisi
Copy link
Collaborator

Another thing we could do is change to user_state_dir() ? (which defaults to ~/.local/state). Our use of this is actually much more in the category of "state" than what is classically associated w/ the runtime dir. If you could confirm that this resolves the issue for you I'll make that change

@domdomegg
Copy link
Contributor Author

Apologies for the delay responding! Yes, either the user_state_dir() or user_data_dir() appear to work fine 👍

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.

2 participants