|
12 | 12 |
|
13 | 13 | import plotly.plotly as py |
14 | 14 | from plotly import utils |
15 | | -from plotly import exceptions |
| 15 | +from plotly.exceptions import PlotlyError |
16 | 16 |
|
17 | 17 | PLOTLY_OFFLINE_DIRECTORY = plotlyjs_path = os.path.expanduser( |
18 | 18 | os.path.join(*'~/.plotly/plotlyjs'.split('/'))) |
@@ -53,15 +53,15 @@ def init_notebook_mode(): |
53 | 53 | from IPython.display import HTML, display |
54 | 54 |
|
55 | 55 | if not os.path.exists(PLOTLY_OFFLINE_BUNDLE): |
56 | | - raise Exception('Plotly Offline source file at {source_path} ' |
57 | | - 'is not found.\n' |
58 | | - 'If you have a Plotly Offline license, then try ' |
59 | | - 'running plotly.offline.download_plotlyjs(url) ' |
60 | | - 'with a licensed download url.\n' |
61 | | - "Don't have a Plotly Offline license? " |
62 | | - 'Contact sales@plot.ly learn more about licensing.\n' |
63 | | - 'Questions? support@plot.ly.' |
64 | | - .format(source_path=PLOTLY_OFFLINE_BUNDLE)) |
| 56 | + raise PlotlyError('Plotly Offline source file at {source_path} ' |
| 57 | + 'is not found.\n' |
| 58 | + 'If you have a Plotly Offline license, then try ' |
| 59 | + 'running plotly.offline.download_plotlyjs(url) ' |
| 60 | + 'with a licensed download url.\n' |
| 61 | + "Don't have a Plotly Offline license? " |
| 62 | + 'Contact sales@plot.ly learn more about licensing.\n' |
| 63 | + 'Questions? support@plot.ly.' |
| 64 | + .format(source_path=PLOTLY_OFFLINE_BUNDLE)) |
65 | 65 |
|
66 | 66 | global __PLOTLY_OFFLINE_INITIALIZED |
67 | 67 | __PLOTLY_OFFLINE_INITIALIZED = True |
@@ -97,7 +97,7 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly'): |
97 | 97 | ``` |
98 | 98 | """ |
99 | 99 | if not __PLOTLY_OFFLINE_INITIALIZED: |
100 | | - raise exceptions.PlotlyError('\n'.join([ |
| 100 | + raise PlotlyError('\n'.join([ |
101 | 101 | 'Plotly Offline mode has not been initialized in this notebook. ' |
102 | 102 | 'Run: ', |
103 | 103 | '', |
|
0 commit comments