graph.py: add try/catch for computing synapse risk

For an unknown reason, rarely an edge fails.
Removed a number of print statements from python files.