diff --git a/magic_html/utils.py b/magic_html/utils.py
index f495a4b..ad9f489 100644
--- a/magic_html/utils.py
+++ b/magic_html/utils.py
@@ -2,6 +2,7 @@
import os
import re
+import logging
from gzip import decompress
import numpy as np
@@ -65,9 +66,13 @@
def _translator():
- import py_asciimath.translator.translator as _translator
+ old_log_level = logging.getLogger().level
+ try:
+ import py_asciimath.translator.translator as _translator
- return _translator
+ return _translator
+ finally:
+ logging.getLogger().setLevel(old_log_level)
def ASCIIMath2Tex(*args, **kwargs):