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

Unable to create output split with spaces in the file path - issue similar to #80 #102

Open
marcusfschmidt opened this issue Nov 2, 2023 · 1 comment

Comments

@marcusfschmidt
Copy link

I am trying to set jukit up on Windows (for now), and I am experiencing an issue related to the folder name I am trying to run from. I have some files located on my university OneDrive, which contains spaces in the folder name. When trying to make an output split for a file located in this folder, I get an error message of the form:

\\University<JUKIT_WS_PH>-<JUKIT_WS_PH>OneDrive\\pythonfile.py 2 --max_size=20\");"
The system cannot find the file specified.

Doing the same with a file not located in a folder with spaces in its name works fine and does not yield any errors - but if there are spaces in the path of the python file, it seems to break.

This seems similar to the issue raised in #80.

@marcusfschmidt
Copy link
Author

marcusfschmidt commented Nov 2, 2023

By substituting both spaces and "-" with a string comprised of (XX) rather than < and >, I can circumvent the issue. I.e. in splits.vim:

        let pyfile_ws_sub =  escape(expand('%'), '\')
        let pyfile_ws_sub = substitute(pyfile_ws_sub, ' ', '(SP)', 'g')
        let pyfile_ws_sub = substitute(pyfile_ws_sub, '-', '(HY)', 'g')

... and subsequently in jukit_run.py:

        py_file = args.py_file.replace("(SP)", " ")
        py_file = py_file.replace("(HY)", "-")

... then it works. The command fails for me if the placeholders are made with <>. Time will tell if I have broken anything with this.

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

No branches or pull requests

1 participant