plt.errorbar expects errors to have the same dimension as x- and y-values (either a list of 2 tuples for up / down errors, or a simple list for symmetric errors).
Do you want to do something like
u = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
plt.errorbar(range(10), u, yerr=[1]*10)
or more clearly with numpy imported as np
u = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
plt.errorbar(np.arange(10), u, yerr=np.ones(10))