The dash_html_components package is deprecated. Please replace `import dash_html_components as html

Viewed 8492

I am trying to use dash 2.0, I also replaced import style in my all files but the problem is occurring in-dash bootstrap, Is there any method by which I can upgrade dash bootstrap for smoother use in dash 2.0 rather than manually changing.

/home/sarim/Desktop/biz-pulse-vm-20210727T040204Z-001/biz-pulse-vm/venv/lib/python3.8/site-packages/dash_bootstrap_components/_table.py:5:

UserWarning: The dash_html_components package is deprecated. Please replace import dash_html_components as html with from dash import html import dash_html_components as html

/home/sarim/Desktop/biz-pulse-vm-20210727T040204Z-001/biz-pulse-vm/venv/lib/python3.8/site-packages/dash_extensions/enrich.py:7:

UserWarning: The dash_core_components package is deprecated. Please replace import dash_core_components as dcc with from dash import dcc import dash_core_components as dcc

2 Answers

You'll need to wait for dash bootstrap to release an update that brings it up to using Dash v2.0. In the meantime, these are only warnings, not errors, and you don't need to worry about them. Dash v2.0 is backwards compatible, so your code should still run fine.

Deprecated means this code is now not in use in dash framework new version. Instead of writing

import dash_html_components as html and import dash_core_components as dcc

write just

from dash import Dash, html, dcc

and to create Instances of dash write

app = Dash(__name__) instead of app = dash.Dash(__name__)

Remaining code will be same.

Related