Skip to content

Commit e47402e

Browse files
committed
Add another test to ensure we can call graphics
1 parent 3110a0d commit e47402e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mathicsscript/format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def eval_boxes(result, fn, obj, **options):
5959
elif expr_type in ("System`Graphics", "System`Plot"):
6060
form_expr = Expression("StandardForm", expr)
6161
result = form_expr.format(obj, "System`StandardForm")
62-
svg_str = eval_boxes(result, result.boxes_to_svg, obj)
63-
if plt and svg2png:
62+
if plt and svg2png and hasattr(result, "boxes_to_svg"):
63+
svg_str = eval_boxes(result, result.boxes_to_svg, obj)
6464
temp_png = NamedTemporaryFile(
6565
mode="w+b", suffix=".png", prefix="mathicsscript-"
6666
)

0 commit comments

Comments
 (0)