UnitTypeError#

exception astropy.units.UnitTypeError[source]#

Used specifically for errors in setting to units not allowed by a class.

E.g., would be raised if the unit of an Angle instances were set to a non-angular unit.