.. classmethod:: fromsympy(expr)
 
         Create a linear expression from a :mod:`sympy` expression.
-        Raise :exc:`ValueError` is the :mod:`sympy` expression is not linear.
+        Raise :exc:`TypeError` is the :mod:`sympy` expression is not linear.
 
     .. method:: tosympy()