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

logic for getManimPath is wrong #103

Open
NutchapolSal opened this issue Oct 27, 2024 · 3 comments
Open

logic for getManimPath is wrong #103

NutchapolSal opened this issue Oct 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@NutchapolSal
Copy link

in src/sideview.ts, the code to get path to venv folder actually obtains path to the python executable, so getManimPath creates paths like D:\manim\venv\Scripts\python.exe\Scripts\manim

also, when the manim-sideview.defaultManimPath config value is an absolute path, the code doesn't check for this resulting in paths like D:\manim\venv\Scripts\python.exe\Scripts\D:\manim\venv\Scripts\manim.exe. running the manim executable directly without activating the venv first seems to run fine, so it shouldn't need to activate venvs and mess with paths if an absolute path is specified.

OS: Windows 11
Extension version: v0.2.14

@Rickaym Rickaym self-assigned this Oct 30, 2024
@Rickaym Rickaym added the bug Something isn't working label Oct 30, 2024
@Rickaym
Copy link
Owner

Rickaym commented Oct 30, 2024

Is it not that env.folderUri.fsPath returns the path to the folder, i.e., D:\manim\venv\ in which case the \Scripts\manim.exe gets appended correctly? That has been the case from my tests. It would be helpful if you show some of the logs from manim sideview.

And I do think you're right on the absolute path part. I'll be patching that today.

Rickaym added a commit that referenced this issue Oct 30, 2024
@NutchapolSal
Copy link
Author

2024-11-02 18-50 manim sideview log.txt
(if you're confused about why there's D: and G:, yes i have my venv and my .pys in separate locations. turns out accessing a venv on a NAS is slow)

Is it not that env.folderUri.fsPath returns the path to the folder

that should be the case according to the types, but my vscode gives out the path to exe for some reason
actually, if you could reliably get the exe path, you wouldn't need to mess with the Scripts or bin thing. just use the parent of the exe.

@Rickaym
Copy link
Owner

Rickaym commented Nov 4, 2024

actually, if you could reliably get the exe path, you wouldn't need to mess with the Scripts or bin thing. just use the parent of the exe.

I suppose I can add a check to see if it is returning an exe path. But very peculiar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants