From 6e64e763101bc70a8372eba41478d4c5166a8acc Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 31 Jan 2022 14:02:00 +0100 Subject: [PATCH] Better error-message on pagerank ev-iter fail --- caliGraph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/caliGraph.py b/caliGraph.py index 51a68bf..8d4440a 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -483,7 +483,8 @@ def runPagerank(G): try: scores = nx.pagerank(G=G) except nx.exception.PowerIterationFailedConvergence: - print('[!] Could not calculate pagerank-scores: power iteration of the eigenvector calculation did not converge') + print('[!] Could not calculate pagerank-scores: Power iteration of the eigenvector calculation did not converge') + print('[ ] Recommendations will be of slighly lower quality') scores = {} for n in list(G.nodes): G.nodes[n]['pagerank_score'] = scores[n] if n in scores else 0