Skip to content

slahes in paramter value lead to error #341

@doutriaux1

Description

@doutriaux1

I am trying to pass path to a file as values to a aparameter that seems to trip maestro completely.

Example yaml;

description:
  name: I_dont_like_slashes
  description: Fails to run if params have slashes

env:
  labels:
      HDF5_DISABLE_VERSION_CHECK: 1

global.parameters:
  SOURCE_FILE:
    values: [ '/some/long/path/that/would/be/here/an/file/name.txt', ]
    label: pth_%%

study:
      - name: fail
        description: Won't be generated
        run:
          cmd: echo $(SOURCE_FILE)
          depends: []

The study is generated by never ran, the log says:

[2021-02-08 14:58:23,005: INFO] Calling execute for StepRecord 'fail_pth_/some/long/path/that/would/be/here/an/file/name.txt'
[2021-02-08 14:58:23,006: INFO] Directory does not exist. Creating directories to /g/g19/cdoutrix/maestro/I_dont_like_slashes_20210208-145820/fail/pth_somelongpaththatwouldbehereanfilename.txt
[2021-02-08 14:58:23,008: INFO] Generating script for fail_pth_/some/long/path/that/would/be/here/an/file/name.txt into /g/g19/cdoutrix/maestro/I_dont_like_slashes_20210208-145820/fail/pth_somelongpaththatwouldbehereanfilename.txt
[2021-02-08 14:58:23,009: ERROR] (2, 'No such file or directory')
Traceback (most recent call last):
  File "/usr/WS2/cdoutrix/pipenvs/kosh_spack/lib/python3.8/site-packages/maestrowf/conductor.py", line 381, in main
    completion_status = conductor.monitor_study()
  File "/usr/WS2/cdoutrix/pipenvs/kosh_spack/lib/python3.8/site-packages/maestrowf/conductor.py", line 351, in monitor_study
    completion_status = dag.execute_ready_steps()
  File "/usr/WS2/cdoutrix/pipenvs/kosh_spack/lib/python3.8/site-packages/maestrowf/datastructures/core/executiongraph.py", line 870, in execute_ready_steps
    self._execute_record(_record, adapter)
  File "/usr/WS2/cdoutrix/pipenvs/kosh_spack/lib/python3.8/site-packages/maestrowf/datastructures/core/executiongraph.py", line 548, in _execute_record
    record.generate_script(adapter, self._tmp_dir)
  File "/usr/WS2/cdoutrix/pipenvs/kosh_spack/lib/python3.8/site-packages/maestrowf/datastructures/core/executiongraph.py", line 89, in generate_script
    adapter.write_script(scr_dir, self.step)
  File "/usr/WS2/cdoutrix/pipenvs/kosh_spack/lib/python3.8/site-packages/maestrowf/abstracts/interfaces/scriptadapter.py", line 116, in write_script
    self._write_script(ws_path, step)
  File "/usr/WS2/cdoutrix/pipenvs/kosh_spack/lib/python3.8/site-packages/maestrowf/interfaces/script/localscriptadapter.py", line 84, in _write_script
    with open(script_path, "w") as script:
FileNotFoundError: [Errno 2] No such file or directory: '/g/g19/cdoutrix/maestro/I_dont_like_slashes_20210208-145820/fail/pth_somelongpaththatwouldbehereanfilename.txt/fail_pth_/some/long/path/that/would/be/here/an/file/name.txt.sh'
[2021-02-08 14:58:23,013: INFO] Study exiting, cleaning up...
[2021-02-08 14:58:23,013: INFO] Squeaky clean!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions