This fails because you can't take the log of a dimensionful number.  So instead, you can should do
``p.log10((G*M_MN_Lup/R_MN_Lup**2)/u.grams)`` or perhaps ``u.solMass`` instead of grams, if that's what was intended.