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

find_graphviz() fails on Windows with GraphViz 2.26.3 #37

Closed
GoogleCodeExporter opened this issue Apr 13, 2015 · 5 comments
Closed

find_graphviz() fails on Windows with GraphViz 2.26.3 #37

GoogleCodeExporter opened this issue Apr 13, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

GraphViz 2.26.3 (which I installed just today) uses a different registry key to 
store the install path.  Instead of "SOFTWARE\ATT\Graphviz" the key used is 
"Software\AT&T Research Labs\GraphViz".

The simplest solution is to check the both locations.

for regkey in ("SOFTWARE\ATT\Graphviz",
               "SOFTWARE\AT&T Research Labs\GraphViz") :
    try :
        hkey = win32api.RegOpenKeyEx( win32con.HKEY_LOCAL_MACHINE,
            regkey, 0, win32con.KEY_QUERY_VALUE )
    except win32api.error :
        continue
    else :
        break
else :
    # Raise error that registry not found
    raise Exception("Unable to find graphviz")

(Modified to fit whatever style conventions you have.)

Since Graphviz puts its bin in the path, a simpler, more logical check, would 
be to just call "dot -V" (or whatever program) and search the output for the 
string "graphviz".

Original issue reported on code.google.com by afog...@gmail.com on 15 Jul 2010 at 2:49

@GoogleCodeExporter
Copy link
Author

Whoops, my registry key is "Software\AT&T Research Labs\Graphviz", with a 
lowercase 'v'.  (I doubt the registry is case-sensitive, but just in case.)

Original comment by afog...@gmail.com on 15 Jul 2010 at 2:59

@GoogleCodeExporter
Copy link
Author

This patch has the right direction, but is not complete (second 'else :' ). It 
resembles issue 29 with included, more complete patch for this issue. Issue 35 
is also related.

Extra information: Installing Graphviz 2.26.3 on Windows 7 doesn't create 
either registry-key. Applying the patch prevents also error for that case.
This issue and issue 35 could be closed.

Original comment by ndegroot0 on 16 Aug 2010 at 9:51

@GoogleCodeExporter
Copy link
Author

Original comment by ero.carr...@gmail.com on 30 Oct 2010 at 5:52

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Issue 35 has been merged into this issue.

Original comment by ero.carr...@gmail.com on 30 Oct 2010 at 5:53

@GoogleCodeExporter
Copy link
Author

Original comment by ero.carr...@gmail.com on 30 Oct 2010 at 10:31

  • Changed state: Duplicate

johnyf pushed a commit that referenced this issue May 10, 2016
Adjusted quoting to DOT lang specification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant