Repository: sympy/sympy

Issue:
TypeError when printing Circle
```
a, b, delta = symbols(r"a, b, \delta")

open_disc = Circle(Point(a, b), delta)
open_disc
```
The code above in JupyterLab causes 'TypeError: cannot determine truth value of Relational'. Stack trace below:

```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/.virtualenvs/general/lib/python3.7/site-packages/IPython/core/formatters.py in __call__(self, obj)
    343             method = get_real_method(obj, self.print_method)
    344             if method is not None:
--> 345                 return method()
    346             return None
    347         else:

~/.virtualenvs/general/lib/python3.7/site-packages/sympy/geometry/entity.py in _repr_svg_(self)
    199             # Expand bounds by a fraction of the data ranges
    200             expand = 0.1  # or 10%; this keeps arrowheads in view (R plots use 4%)
--> 201             widest_part = max([xmax - xmin, ymax - ymin])
    202             expand_amount = widest_part * expand
    203             xmin -= expand_amount

~/.virtualenvs/general/lib/python3.7/site-packages/sympy/core/relational.py in __nonzero__(self)
    382 
    383     def __nonzero__(self):
--> 384         raise TypeError("cannot determine truth value of Relational")
    385 
    386     __bool__ = __nonzero__

TypeError: cannot determine truth value of Relational
```
Strangely, the definition of the Circle **DOES** get printed but after the stack trace:

𝐶𝑖𝑟𝑐𝑙𝑒(𝑃𝑜𝑖𝑛𝑡2𝐷(𝑎,𝑏),𝛿)

Discussion:

Patch:
diff --git a/sympy/geometry/entity.py b/sympy/geometry/entity.py
index cfd30a07bc..bbe3299533 100644
--- a/sympy/geometry/entity.py
+++ b/sympy/geometry/entity.py
@@ -171,6 +171,9 @@ def _repr_svg_(self):
             # will fall back to the next representation
             return None
 
+        if any([not x.is_number or not x.is_finite for x in bounds]):
+            return None
+
         svg_top = '''<svg xmlns="http://www.w3.org/2000/svg"
             xmlns:xlink="http://www.w3.org/1999/xlink"
             width="{1}" height="{2}" viewBox="{0}"


Test patch:
diff --git a/sympy/geometry/tests/test_entity.py b/sympy/geometry/tests/test_entity.py
index 389f336c55..5cfb6e5450 100644
--- a/sympy/geometry/tests/test_entity.py
+++ b/sympy/geometry/tests/test_entity.py
@@ -1,4 +1,4 @@
-from sympy import Symbol, Rational
+from sympy import Symbol, Rational, S
 from sympy.geometry import Circle, Ellipse, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle
 from sympy.geometry.entity import scale, GeometryEntity
 from sympy.testing.pytest import raises
@@ -25,6 +25,17 @@ def test_entity():
     assert GeometryEntity.encloses(c, RegularPolygon(Point(8, 8), 1, 3)) is False
 
 
+def test_svg():
+    a = Symbol('a')
+    b = Symbol('b')
+    d = Symbol('d')
+
+    entity = Circle(Point(a, b), d)
+    assert entity._repr_svg_() is None
+
+    entity = Circle(Point(0, 0), S.Infinity)
+    assert entity._repr_svg_() is None
+
 
 def test_subs():
     x = Symbol('x', real=True)