question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import dash-html-components with dash==0.23.1 and python>=3.7

See original GitHub issue

See discussion here: https://community.plot.ly/t/error-running-dash-after-upgrade-of-plotly/12507/5?u=chriddyp

It looks like the IDE support PR can not handle components which have arguments that are Python Keywords.

None of the core components have had these in 3.6, but that changed in 3.7.

The PR #325 is a patch to fix this, namely it checks if each argument is in keyword.kwlist, and if it is Dash will accept that keyword via **kwargs rather than via a named argument.

A SyntaxError: invalid syntax is thrown at dash_html_components/Script.py, line 48 when attempting to import dash-html-components with dash==0.23.1 and python>=3.7.

Fix is to downgrade dash to 0.22.0, patch will be merged soon: https://github.com/plotly/dash/pull/325

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rmarren1commented, Sep 20, 2018

Yeah the files in the repo are against 3.6. I’ll change them to be against 3.7 and release 0.13.1 to fix this

0reactions
rmarren1commented, Sep 21, 2018

@rmbarley Should work with dash-html-components==0.13.2 just released as a patch

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly Dash ImportError: cannot import name 'dcc' from 'dash'
I've tried uninstalling and reinstalling dash, along with renaming the file and got nowhere. Any help is appreciated, thanks! from dash import Dash,...
Read more >
Dash & Python 3.7 don't work anymore
Hi I get the following error: File "index.py", line 7, in <module> import dash_html_components as html File ...
Read more >
Unable to Import dash : Forums - PythonAnywhere
Unable to Import dash. Hi,. I am trying to run the following code;. import ...
Read more >
Readme · DashVtk.jl - JuliaHub
Dash VTK lets you integrate the vtk.js visualization pipeline directly into ... import dash import dash_vtk import dash_html_components as html app = dash....
Read more >
dash-html-components - npm
Vanilla HTML components for Dash. Latest version: 2.0.5, last published: 2 months ago. Start using dash-html-components in your project by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found