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
KeyError: 'agedge: no key' #258
Comments
Hello @fedpet, this is a reoccurring problem of Long story short: afaik we cannot do much about it since it seems to be related to |
the error only happens when I try to draw reflexive transitions or ones which have '*' as the source. edit. edit. |
It shouldn't matter (we have used a couple of versions) as the issue is exclusive to Windows. Our test servers run Ubuntu 14.04 and I work with OSX Sierra (both use pygraphviz 1.3.1 currently). I have also used from transitions.extensions import GraphMachine
states = ['first', 'second']
transitions = [
['any_trigger', 'first', 'first'],
['anything', '*', 'second'],
]
machine = GraphMachine(states=states, transitions=transitions, initial='first',
auto_transitions=False, show_conditions=True)
machine.get_graph().draw('fsm.png', prog='dot') produces this result: I assume this would not work in your environment.
Bummer, it seems like they closed the issue without actually fixing it then. Thanks for giving it a try. |
I am trying to set up a Windows CI test job but installing pygraphviz does not play very nice. @fedpet: How did you install pygraphviz? Unfortunately, using pip after installing Graphviz finishes but I end up with DLL import errors (event though PATH is set correctly). The only way I got it to work was by using the unofficial binary builds that are suggested occasionally but this does not look like a way suitable for an automatic build process. |
Nevermind, PATH has not been set correctly. Our tests fail on Windows as you can see here. I also added some try/catch phrases in the I do not see what we could do differently given the fact that we have no platform specific code and tests do succeed on Linux and OSX. If you have any suggestions about how to approach this issue I am all ears. |
hi aleneum, thank you for your support.
Exactly
This. I'm not using unofficial binaries. Glad to see you found the problem :) Your answer suggests me the problem may be on pygraphviz or graphviz side.
A minimal code example demonstrating this bug would be needed to be able to open a proper bug report on pygraphviz/pygraphviz or graphviz-issue-tracker |
Hi @fedpet, I added a minimal test to import pygraphviz as pgv
from unittest import TestCase
class TestGraphviz(TestCase):
def test_self_reference(self):
G = pgv.AGraph()
G.add_node('a')
G.add_edge('a', 'a')
print(G) Status *nix: works |
For everyone having similar issues in 2020: I tried the minimal example (ref) and the graph (ref) with Graphviz 2.41 64-bit from here (link is also mentioned on the Graphviz page here) and pygraphviz 1.6.dev0 with the patch mentioned here (see this discussion). Both seem to work. If you experience issues with from transitions.extensions import GraphMachine as Machine
m = Model()
# when you want to use graphviz explicitely
machine = Machine(model=m, use_pygraphviz=False) |
On Windows 10 & Python 2.7
After MANY installation errors with pygraphviz I've come to this one which it seems I'm not able to solve by myself:
it seems it is caused by some transitions configurations like this:
or
The text was updated successfully, but these errors were encountered: