diff --git a/caliGraph.py b/caliGraph.py index 8865975..f72f72f 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -818,7 +818,12 @@ def recommenderCompetence(G): for n in list(G.nodes): node = G.nodes[n] if node['t'] == 'recommender': - node['score'] -= node['se'] * 1 + if 'se' in node: + node['score'] -= node['se'] * 1 + else: + if not node['score']: + node['score'] = 0 + node['score'] /= 2 def readBooksAnalysis(G, minRating=0, showAllTags=True, removeUnconnected=False, removeTopListsB=True): removeUnread(G)