Skip to content

allow non-absolute paths for input to level2 converter #30

Description

@observingClouds

Fails: sounding_converter -i test_level1.nc -o test_level2_{direction}.nc -c config/main.yaml
Works: sounding_converter -I ${PWD}/test_level1.nc -o ./test_level2_{direction}.nc -c ./config/main.yaml

Error:

Traceback (most recent call last):
  File "/pysonde/bin/sounding_converter", line 8, in <module>
    sys.exit(main())
  File "/pysonde/pysonde/pysonde.py", line 131, in main
    input_files = h.find_files(args["inputfile"])
  File "/pysonde/pysonde/_helpers.py", line 164, in find_files
    filelist = expand_pathglobs(arg_input[0])
  File "/pysonde/pysonde/_helpers.py", line 188, in expand_pathglobs
    return expand_pathglobs(pathparts[1:], [Path(pathparts[0])])
  File "/pysonde/pysonde/_helpers.py", line 190, in expand_pathglobs
    assert pathparts[0] != "/"
IndexError: tuple index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions