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

Issues with spaces in paths #21

Open
rooklift opened this issue Mar 31, 2024 · 5 comments
Open

Issues with spaces in paths #21

rooklift opened this issue Mar 31, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@rooklift
Copy link

It seems Sayuri (on Windows, anyway) cannot launch if its path contains any spaces.

Also, I believe it cannot load weights if the location of the weights contains any spaces.

@CGLemon
Copy link
Owner

CGLemon commented Apr 1, 2024

Thanks. I check this issue. The engine can not load path including space on the Command Prompt. However, I don't think it is a bug? should have a way to input the whole path string?

@CGLemon CGLemon added the question Further information is requested label Apr 1, 2024
@rooklift
Copy link
Author

rooklift commented Apr 1, 2024

Well:

PS C:\Users\Owner\Documents\Misc\sayuri-v0.7.0-cuda12 windows-x64> .\sayuri-v0.7.0-cuda12-windows-x64.exe
Command(s) Error:
 are not understood.

I'm not doing anything except launch it. You can reproduce this just by double-clicking the exe, if its path has a space, it will quit instantly, whereas without a space, you can enter the GTP console at least.

@rooklift
Copy link
Author

rooklift commented Apr 1, 2024

I'm no C++ person, but it seems like these lines:

Splitter::Splitter(int argc, char** argv) {
auto oss = std::ostringstream{};
for (int i = 0; i < argc; ++i) {
oss << argv[i] << " ";
}
Parse(std::forward<std::string>(oss.str()), kMaxBufferSize);
}

are merging the various argv strings, including argv[0]

so e.g. if you have these arguments:

[0] some path with spaces/sayuri.exe
[1] -w
[2] some path with spaces/weights.txt

it will merge all this into a single space-separated string, which it can no longer parse, since it can't tell where one arg ends and another begins?

@CGLemon CGLemon added bug Something isn't working and removed question Further information is requested labels Apr 2, 2024
@CGLemon
Copy link
Owner

CGLemon commented Apr 2, 2024

I did not notice that. Thanks for your help.

@CGLemon
Copy link
Owner

CGLemon commented Apr 2, 2024

Fix this bug at next branch and test it on the Ubuntu. It works well now.

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