-
|
When generating inputs for s4x1 in 2030 the add reserve info and add extreme day scripts fail to run. From my debugging and with help from Gemini. it appears as though the way the file path to the input folders where the files that the scripts need to edit is constructed in a way that is not compatible with Windows. I assume the scripts work fine in Linux/mac. This code change (starting in line 1478 of pg_to_switch) seems to fix the errors but I don't know if it works on Linux/mac. Curious if other have the same error / if this fix works... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Probably too late to check, but can you say what errors are reported when those scripts try to run, and also what command line is shown at the top before running them? The code seems like it should be cross-platform, so I want to focus in on which part needs changing. I can also check on Windows myself a little later if needed. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks. As you saw, the problem was that I was using |
Beta Was this translation helpful? Give feedback.
Thanks. As you saw, the problem was that I was using
shlex.join(), which does the wrong kind of quoting for Windows. I've implemented a cross-platform fix, which sends the command and arguments directly to the OS without using shell parsing. That should be more robust. It will also switch betweenshlex.join()andsubprocess.list2cmdline()depending on the platform, but only use them for display purposes. The new code is in pg_to_switch.py now, so it should work after you rungit pull.