Skip to content

`Result.plot_corner` should still work OOTB if I move the hdf5 file

Tried to use plot_corner on a result file that I loaded in after moving it over from the cluster to my local machine. The issue is that the outdir attribute still points to the old location. I think this should be overwritten in read_in_result

Traceback (most recent call last):
  File "/home/moritz/Dropbox/PhD/PythonProjects/bilby_posterior_evaluation/mass_parameters.py", line 8, in <module>
    res.plot_corner(parameters=['mass_ratio', 'total_mass'], outdir=outdir)
  File "/home/moritz/.local/lib/python3.6/site-packages/bilby-0.3.3-py3.6.egg/bilby/core/result.py", line 682, in plot_corner
    utils.check_directory_exists_and_if_not_mkdir(self.outdir)
  File "/home/moritz/.local/lib/python3.6/site-packages/bilby-0.3.3-py3.6.egg/bilby/core/utils.py", line 446, in check_directory_exists_and_if_not_mkdir
    os.makedirs(directory)
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  [Previous line repeated 4 more times]
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/fred'