Skip to content

Commit

Permalink
ImportError raised if ipywidgets is missing during IPythonProgressBar.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgranade committed Apr 27, 2016
1 parent c5ff7cf commit a5e143f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qinfer/ipy.py
Expand Up @@ -55,6 +55,8 @@ class IPythonProgressBar(object):
classes.
"""
def __init__(self):
if ipw is None:
raise ImportError("IPython support requires the ipywidgets package.")
self.widget = ipw.FloatProgress(
value=0.0, min=0.0, max=100.0, step=0.5,
description=""
Expand Down

0 comments on commit a5e143f

Please sign in to comment.