Issue #1338: _localize_check trying to join strings with None (yt_analysis/yt)

New issue 1338: _localize_check trying to join strings with None https://bitbucket.org/yt_analysis/yt/issues/1338/_localize_check-trying-to-j... Anonymous: In yt version 3.3.5 (installed by pip) run in python 2.7.13, when loading a BoxLib format folder I get the following message: Traceback (most recent call last): File "get_plot.py", line 20, in <module> ds=yt.load(file_name) File "xxx/python2.7/site-packages/yt/convenience.py", line 86, in load return candidates[0](*args, **kwargs) File "xxx/python2.7/site-packages/yt/frontends/boxlib/data_structures.py", line 392, in __init__ self.cparam_filename = self._localize_check(cparam_filename) File "xxx/python2.7/site-packages/yt/frontends/boxlib/data_structures.py", line 415, in _localize_check if os.path.exists(full_fn): File "xxx/python2.7/genericpath.py", line 26, in exists os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found The problem is occurring in the BoxLibDataset class of data_structures.py In the __init__ of this class, the parameters, cparam_filename, and fparam_filename are set to None. The function _localize_check will then try to see if if the files exist or not, however, it tries to join the root_dir with the variable cparam_filename which is set to none in the __init__ function. The code crashes because join cannot handle anything but strings and buffers, and it is getting None. The version of yt in Anaconda (version 3.3.2) has the __init__ function of the BoxLibDataset class define cparam_filename and fparam_filename as string file names ('inputs' and something else I can't remember) that coincide with the BoxLib standards.
participants (1)
-
Anonymous