The problem was that label_pos=0.5 makes the two weight labels overlap. Setting it to 0.7 and writing connectionstyle='arc3,rad=0.4' in both nx.draw_networkx_edges() and nx.draw_networkx_edge_labels() fixed the issue.