One of our group members ran into this today when doing ds = CastroDataset('~/delta_ims/en_20/planar_plt02346'), with an error like:
yt/frontends/boxlib/data_structures.py", line 1116, in _parse_parameter_file
jobinfo_filename = os.path.join(self.output_dir, self.cparam_filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen posixpath>", line 90, in join
File "<frozen genericpath>", line 164, in _check_arg_types
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
self._lookup_cparam_filepath() was being passed the version of output_dir before having the tilde expanded, and was returning None as ./~/ doesn't exist.
I'm not sure how to add a test for this.
PR Checklist
[ ] Adds a test for any bugs fixed. Adds tests for new features.
PR Summary
One of our group members ran into this today when doing
ds = CastroDataset('~/delta_ims/en_20/planar_plt02346')
, with an error like:self._lookup_cparam_filepath()
was being passed the version ofoutput_dir
before having the tilde expanded, and was returningNone
as./~/
doesn't exist.I'm not sure how to add a test for this.
PR Checklist