Closed carvalhomb closed 5 years ago
I am also having this KeyError exception.
The offending method (for me) is calculate_loops_length_two
in the file pm4py.objects.heuristics_net.node.py
.
Where dfg_matrix[n1][n2]
throws the error.
After browsing through the source code I found that dfg_matrix is used in an unsafe manner throughout the project.
To fix this I suggest indexing dfg_matrix
with tuples so dfg_matrix[n1,n2]
then you can either fix this by calling dfg_matrix.get((n1, n2), 0)
to safely get the values or you can use collections.abc.MutableMatrix to overwrite __get__
so you can still call dfg_matrix[n1, n2]
and get a default value if none is present.
Thank you both for signaling the bug and the suggestions
I will try to solve the issue and release an hotfix release before Monday :)
@Javert899 That sounds great. Thanks.
The signaled issue was corrected in hotfix release 1.1.10 (docker images are being rebuilt from now)
Thanks again for signaling
@Javert899 Great. It seems to be working 👍
Excellent, for me it is also working :) Closing the issue.
Trying to use the Heuristics Miner functionality, I came across a KeyError when trying to get an heuristics net. The error depends on the dependency threshold set.
Code to reproduce the error below, with (zipped) example log attached.
testlog.zip