Closed yousefmoazzam closed 5 months ago
Changing the line
parent_dir = os.path.dirname(os.path.abspath("__file__"))
to
parent_dir = Path(__file__).parent.parent
fixes the issue for me, so maybe we can do this change (or something similar) at some point.
Fixed by merge of #201 into the gpuloop
branch
There's a subtle bug in the YAML checker that is not found unless the YAML checker is executed from a current working directory other than the httomo root directory.
There shouldn't be double quotation marks around
__file__
in order to refer to the file in the following: https://github.com/DiamondLightSource/httomo/blob/f53709ac6350898dcfe874961241d98e3a722f84/httomo/yaml_checker.py#L336Doing
os.path.abspath("__file__")
is trying to refer to a file called__file__
in the current working directory, which is going to change depending on where the user is navigated to in the terminal.If I run the YAML checker in the httomo root dir, it works:
But if I
cd
into thetests/
directory and try to run the checker, it fails: