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

[Package] subprocess_lwd assumes a linux environment and fails on windows #41

Open
wknoben opened this issue Mar 8, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@wknoben
Copy link
Collaborator

wknoben commented Mar 8, 2022

https://github.com/bartvanosnabrugge/summaWorkflow_public/blob/28719ccafb83feeb794c9a54ec07244535564e64/cwarhm/wrappers/cwarhm_summa.py#L71
on windows, sends the following to terminal:

sh C:/Git_repos/cwarhm/summaWorkflow_public/dependencies/cwarhm-summa\3b_parameters\MERIT_Hydro_DEM\2_unpack\unpack_merit_hydro_dem.sh

which fails with this error:

running wrapper for C:/Git_repos/cwarhm/summaWorkflow_public/dependencies/cwarhm-summa\3b_parameters\MERIT_Hydro_DEM\2_unpack\unpack_merit_hydro_dem.sh
Traceback (most recent call last):
  File "test_bow_at_banff.py", line 56, in <module>
    fm.unpack_merit_hydro(cwarhm_summa_folder)
  File "C:\Git_repos\cwarhm\summaWorkflow_public\cwarhm\wrappers\cwarhm_summa.py", line 339, in unpack_merit_hydro
    subprocess_lwd(python_file_to_run)
  File "C:\Git_repos\cwarhm\summaWorkflow_public\cwarhm\wrappers\cwarhm_summa.py", line 71, in subprocess_lwd
    subprocess.run(["sh",script_path])
  File "C:\Users\wmk934\Anaconda3\envs\cwarhm-env\lib\subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\wmk934\Anaconda3\envs\cwarhm-env\lib\subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\wmk934\Anaconda3\envs\cwarhm-env\lib\subprocess.py", line 1311, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
@wknoben wknoben added the bug Something isn't working label Mar 8, 2022
@wknoben wknoben added this to the package CWARHM milestone Mar 8, 2022
@wknoben
Copy link
Collaborator Author

wknoben commented Mar 8, 2022

Essentially, make sure the workflow's .sh files can be executed under windows

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

1 participant