Skip to content

Commit

Permalink
Improved warning message stack trace for unexpected error (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorisjlee committed Nov 27, 2020
1 parent 8e42fb8 commit 3a8d9f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lux/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from lux.utils.utils import check_import_lux_widget
from typing import Dict, Union, List, Callable
import warnings
import traceback
import lux


Expand Down Expand Up @@ -684,13 +685,14 @@ def on_button_clicked(b):

except (KeyboardInterrupt, SystemExit):
raise
except:
except Exception:
warnings.warn(
"\nUnexpected error in rendering Lux widget and recommendations. "
"Falling back to Pandas display.\n\n"
"Please report this issue on Github: https://github.com/lux-org/lux/issues ",
"Falling back to Pandas display.\n"
"Please report the following issue on Github: https://github.com/lux-org/lux/issues \n",
stacklevel=2,
)
warnings.warn(traceback.format_exc())
display(self.display_pandas())

def display_pandas(self):
Expand Down

0 comments on commit 3a8d9f9

Please sign in to comment.