Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 57c309f

Browse files
committed
improve dash import test
see plotly/dash#1143
1 parent f25b324 commit 57c309f

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

Diff for: dash_html_components_base/__init__.py

+3-12
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,9 @@
1616
__version__ = package['version']
1717

1818
# Module imports trigger a dash.development import, need to check this first
19-
if not hasattr(_dash, 'development'):
20-
print(
21-
"Dash was not successfully imported. Make sure you don't have a file "
22-
"named \n'dash.py' in your current directory.", file=_sys.stderr)
23-
_sys.exit(1)
24-
25-
# Must update to dash>=0.22.0 to use this version of dash-html-components
26-
if not hasattr(_dash.development.base_component, '_explicitize_args'):
27-
print("Please update the `dash` module to >= 0.22.0 to use this "
28-
"version of dash_html_components.\n"
29-
"You are using version {:s}".format(_dash.version.__version__),
30-
file=_sys.stderr)
19+
if not hasattr(_dash, '__plotly_dash') and not hasattr(_dash, 'development'):
20+
print("Dash was not successfully imported. Make sure you don't have a file "
21+
"named \n'dash.py' in your current directory.", file=_sys.stderr)
3122
_sys.exit(1)
3223

3324

0 commit comments

Comments
 (0)