Closed dwightmulcahy closed 4 years ago
diagrams_graphviz.py
should be stringifying the node labels.
Hi @dwightmulcahy,
does this issue still persist? I would have thought that d28e8c2e11708dd82a86d04cc630608fef6bdd09 tackles this.
I tested:
import enum
from transitions.extensions.diagrams import GraphMachine
class Health(object):
class States(enum.Enum):
UNKNOWN = 0
machine = GraphMachine(use_pygraphviz=False, states=Health.States, initial=Health.States.UNKNOWN)
machine.get_graph().draw('my_state_diagram.png', prog='dot')
and it produces
Graph.set_node_style
had been called with the enum instance rather than the enum's name. should be fixed in master
.
so this minimal example will bomb when you use states that are enums...
as an example: