diff --git a/autotest/pst_from_tests.py b/autotest/pst_from_tests.py index 233387530..e2768319a 100644 --- a/autotest/pst_from_tests.py +++ b/autotest/pst_from_tests.py @@ -1180,7 +1180,7 @@ def mf6_freyberg_da_test(): print(pf.org_files) # build pest - pst = pf.build_pst('freyberg.pst') + pst = pf.build_pst('freyberg.pst', version=2) pst.write(os.path.join(template_ws,"freyberg6_da.pst"),version=2) @@ -2388,8 +2388,9 @@ def test_get_filepath(): #freyberg_prior_build_test() #mf6_freyberg_test() #mf6_freyberg_shortnames_test() - # mf6_freyberg_da_test() + mf6_freyberg_da_test() #mf6_freyberg_direct_test() #mf6_freyberg_varying_idomain() #xsec_test() mf6_freyberg_short_direct_test() + diff --git a/pyemu/pst/pst_handler.py b/pyemu/pst/pst_handler.py index 3d6fce27b..264d18562 100644 --- a/pyemu/pst/pst_handler.py +++ b/pyemu/pst/pst_handler.py @@ -1488,6 +1488,7 @@ def sanity_checks(self): def _write_version2(self, new_filename, use_pst_path=True, pst_rel_path="."): pst_path = None + new_filename = str(new_filename) # ensure convert to str if use_pst_path: pst_path, _ = Pst._parse_path_agnostic(new_filename) if pst_rel_path == ".": diff --git a/pyemu/utils/pst_from.py b/pyemu/utils/pst_from.py index 41377ba17..c8ba42eda 100644 --- a/pyemu/utils/pst_from.py +++ b/pyemu/utils/pst_from.py @@ -1345,7 +1345,7 @@ def add_parameters( par_data_cols = pyemu.pst_utils.pst_config["par_fieldnames"] self.logger.log( "adding {0} type {1} style parameters for file(s) {2}".format( - par_type, par_style, str(filenames) + par_type, par_style, [str(f) for f in filenames] ) ) if geostruct is not None: @@ -1875,8 +1875,9 @@ def add_parameters( # variograms=v) self.logger.log( - "adding {0} type {1} style parameters for file(s) {2}" - "".format(par_type, par_style, str(filenames)) + "adding {0} type {1} style parameters for file(s) {2}".format( + par_type, par_style, [str(f) for f in filenames] + ) ) if rebuild_pst: # may want to just update pst and rebuild @@ -2923,4 +2924,4 @@ def get_relative_filepath(folder, filename): """Like :func:`~pyemu.utils.pst_from.get_filepath`, except return path for filename relative to folder. """ - return get_filepath(folder, filename).relative_to(folder) \ No newline at end of file + return get_filepath(folder, filename).relative_to(folder)