Seems to me the script you have is missing a part in the function evaluateThermoelectricTransportCoefficients, compared to the original one posted in
https://forum.quantumatk.com/index.php?topic=5883.
I don't have any data to test on, but basically it's missing the evaluation of thermal_conductance_electrons
k2 = -1.0*Units.e**2/planck_constant*(boltzmann_constant*temperature)**2*sum(E*E*T1*df)*dE
thermal_conductance_electrons = (k2*k0-k1*k1)/(temperature*k0*Units.e**2)
and then the return statement should also include this
return [seebeck_coefficient, k0, energy_shift, thermal_conductance_electrons]
I hope that solves it, as mentioned I cannot test it myself right now