Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(issue 2950): properly handle spaces in file paths when invoking commands#2951

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
detjonmataj wants to merge2 commits intounslothai:main
base:main
Choose a base branch
Loading
fromdetjonmataj:fix/issue-2950-gguf-converter-space-in-paths

Conversation

@detjonmataj
Copy link

@detjonmatajdetjonmataj commentedJul 13, 2025
edited
Loading

Summary

Make subprocess calls safer when using commands containing paths with spaces and ensure they run with the current Python interpreter.

Changes

  • Use argument lists instead of interpolated command string so paths with spaces are escaped properly.
  • Replace hard‑coded"python"/"python3" withsys.executable for interpreter consistency.
  • Add ashell parameter totry_execute() to setshell=False insubprocess.Popen when passing commands as a list of args.

Related Issue

Closes#2950.

@detjonmataj
Copy link
Author

detjonmataj commentedJul 13, 2025
edited
Loading

I think we should setshell=False inPopen for the changed commands in this PR, but it doesn’t seem to work on Windows (which is odd). We’ll probably need a different approach to escaping file paths. Any thoughts?

Edit:
I’ve added logic to useshell=False when passing the command as a list of arguments. Also, instead of hardcoding the Python executable name, it’s better to usesys.executable so we stay within the active environment (otherwise it might pick up the global Python rather than our.venv). Finally, the calls weren’t uniform as some usedpython3 and others justpython which could lead to failures (depending on the environment or OS). Let me know what you think!

Datta0 reacted with thumbs up emoji

@detjonmatajdetjonmataj marked this pull request as ready for reviewJuly 13, 2025 13:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug] llama.cpp GGUF converter command fails on paths with spaces (Unsloth: Quantization failed for)

1 participant

@detjonmataj

[8]ページ先頭

©2009-2025 Movatter.jp