Closed esgg closed 2 years ago
Are the Graphviz executables on your systems PATH? @esgg
On macOS you can try: brew install graphviz
On in windows... https://stackoverflow.com/questions/9546324/adding-a-directory-to-the-path-environment-variable-in-windows. I added these two paths on windows: D:\Graphviz\bin and D:\Graphviz\bin\dot.exe
Where are these executables? I didn´t see this information in the README. I am using Ubuntu.
Sorry, it's not in the readme. I just updated it with how to install the binaries.
I have followed the instructions of the README file but it is not working. I think it is because we are using and ubuntu server (without a graphical interface). What do you think? I copy the output of the application:
/usr/bin/xdg-open: 869: www-browser: not found /usr/bin/xdg-open: 869: links2: not found /usr/bin/xdg-open: 869: elinks: not found /usr/bin/xdg-open: 869: links: not found /usr/bin/xdg-open: 869: lynx: not found /usr/bin/xdg-open: 869: w3m: not found xdg-open: no method available for opening 'visual-my_FAIR_RO_validation.pdf'
Remove this line and try again. https://github.com/oeg-upm/FAIR-Research-Object/blob/fca0c3a68b19877db3ad104f4d2d1362e1843c33/code/visualizer.py#L101
This will generate the pdf file but without opening it.
By the way, I think I forgot to mention that you can show in the graph the tests that have been done simply by uncommenting this line: https://github.com/oeg-upm/FAIR-Research-Object/blob/fca0c3a68b19877db3ad104f4d2d1362e1843c33/code/visualizer.py#L99
it's usually a chaos, but the possibility is there.
Solved. Thank you!
When I try to execute the demo example, I got the following error:
Traceback (most recent call last): File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/backend/execute.py", line 81, in run_check proc = subprocess.run(cmd, *kwargs) File "/usr/lib/python3.9/subprocess.py", line 505, in run with Popen(popenargs, **kwargs) as process: File "/usr/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: PosixPath('dot')
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/egonzalez/FAIR-Research-Object/code/full_ro_fairness.py", line 295, in
ROFairnessCalculator(args.ro_path).\
File "/home/egonzalez/FAIR-Research-Object/code/full_ro_fairness.py", line 259, in calculate_fairness
visualizer.generate_visual_graph(output_name)
File "/home/egonzalez/FAIR-Research-Object/code/visualizer.py", line 95, in generate_visual_graph
g.view()
File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/_tools.py", line 171, in wrapper
return func(*args, kwargs)
File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/rendering.py", line 185, in view
return self.render(filename=filename, directory=directory, view=True,
File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/_tools.py", line 171, in wrapper
return func(*args, *kwargs)
File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/rendering.py", line 122, in render
rendered = self._render(args, kwargs)
File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/_tools.py", line 171, in wrapper
return func(*args, **kwargs)
File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/backend/rendering.py", line 324, in render
execute.run_check(cmd,
File "/home/egonzalez/FAIR-Research-Object/env_fair/lib/python3.9/site-packages/graphviz/backend/execute.py", line 84, in run_check
raise ExecutableNotFound(cmd) from e
graphviz.backend.execute.ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH
The execution of SOMEF was successful.