-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Description
Describe the bug
The pyemu.utils.get_pestpp.run_main function downloads PEST++. A bindir argument has to be provided, of type str or Path according to the docstring. There is call to the .startswith method on line 379 However, a Path object does not have a .startswith method.
To Reproduce
Steps to reproduce the behavior:
from pathlib import Path
import pyemu
bindir = Path("bin")
bindir.mkdir(parents=True, exist_ok=True)
pyemu.utils.get_pestpp.run_main(bindir)raises
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File ~/repos/pyemu/pyemu/utils/get_pestpp.py:379, in run_main(bindir, owner, repo, release_id, ostag, subset, downloads_dir, force, quiet, _is_cli)
376 exe_suffix, lib_suffix = get_suffixes(ostag)
378 # select bindir if path not provided
--> [379] if bindir.startswith(":"):
380 bindir = select_bindir(
381 bindir, previous=prev_bindir, quiet=quiet, is_cli=_is_cli
382 )
383 elif not isinstance(bindir, (str, Path)):
AttributeError: 'PosixPath' object has no attribute 'startswith'Metadata
Metadata
Assignees
Labels
No labels