Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renview stuck #11

Open
raoulpetite opened this issue Apr 15, 2021 · 3 comments
Open

renview stuck #11

raoulpetite opened this issue Apr 15, 2021 · 3 comments

Comments

@raoulpetite
Copy link

Hi, I'm investigating renview to see if it can help in my research work. Unfortunately, it looks like it remains stuck somewhere after the creation of the result directory (see the message below obtained after a Crtl C). I tried several things without any success. Let me add that I tested graphiz with small examples from its manual and they worked fine.
So if if someone can help, I ll be grateful.

message (unbuntu 20.04): File "run.py", line 64, in
run(**default_kwargs)
File "run.py", line 20, in run
gg.generate_visualizations()
File "/home/hc/.local/lib/python3.8/site-packages/renview/GraphGenerator/init.py", line 662, in generate_visualizations
check_call(['dot', '-Tsvg', f.name, '-o', filename_svg], shell=True)
File "/usr/lib/python3.8/subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.8/subprocess.py", line 342, in call
return p.wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1079, in wait
return self._wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1804, in _wait
(pid, sts) = self._try_wait(0)
File "/usr/lib/python3.8/subprocess.py", line 1762, in _try_wait
(pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

@raoulpetite raoulpetite changed the title renview stucks renview stucked Apr 15, 2021
@raoulpetite raoulpetite changed the title renview stucked renview stuck Apr 15, 2021
@uditgupta0912
Copy link
Member

Hi Raoul,

It seems that the issue might be because of the check_call renview uses to generate svg files in Windows. In ubuntu, replacing that line with

dot -Tsvg f.name -o filename_svg

should work fine.

Can you comment out the check_call in the GraphGenerator/init.py and use the above statements to generate the svg files?

@raoulpetite
Copy link
Author

Sir,
First of all, I thank you for the time you spent to answer my post.
The dot statement you recommended me to use in init.py lead to the following error :
dot -Tsvg f.name -o filename_svg
^
SyntaxError: invalid syntax

Nevertheless, your description of the error helped me out to find a fix. I commented out the check_call lines and replace it by the 2 following lines for each check_call.
(graph,) = pydot.graph_from_dot_file(f.name)
graph.write_svg(filename_svg)

It required also to import pydot. It looks like this worked just fine as I have now all the svg files in the ammonia example directory.
Regards

@uditgupta0912
Copy link
Member

Thanks, Raoul for letting us know that you were able to find a workaround.

dot -Tsvg f.name -o filename_svg

works if Graphviz has been added to the system path. dot is a built-in command in Graphviz.

pydot is doing the same thing where pydot is a python package for Graphviz.

I will include instructions for people working on OS other than windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants