Calibration Curve Error
It's hard to say without your data.  I'd comment this, but it's a bit long and better formatted as an answer.
The part of the source code that's relevant is quite short, so you can go through step by step to see what's wrong:
bins = np.linspace(0., 1. + 1e-8, n_bins + 1)
binids = np.digitize(y_prob, bins) - 1
bin_sums = np.bincount(binids, weights=y_prob, minlength=len(bins))

digitize can return 0 if an element is to the left of all the bins; that shouldn't happen here, but maybe some computational precision error has crept in?  Check what values you get for binids above.
See also this StackOverflow question, where NaNs were the culprit.