Two possibilities occur to me: you've set alpha to something peculiar (unlikely) or some of your edge weights are zero (or NaN).
Try running it without specifying your own edge weights. If that works then there's something weird with your edge weights.