dash icon indicating copy to clipboard operation
dash copied to clipboard

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

Open rmarren1 opened this issue 8 years ago • 6 comments

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

rmarren1 avatar Aug 08 '18 15:08 rmarren1

Fixed in dash==0.24.1

rmarren1 avatar Aug 11 '18 00:08 rmarren1

This is still not working for me with dash==0.26.6. I tried reinstalling and downgrading to dash==0.24.1, and it still fails with the same syntax error.

rmbarley avatar Sep 20 '18 16:09 rmbarley

Try dash-html-components==0.12.0. It looks like 0.13.0 was built against py2.7 or py3.6 causing this error.

rmarren1 avatar Sep 20 '18 18:09 rmarren1

@rmarren1 I just released 0.13.0 with the dev bundle support, I didn't touch the .py files and didn't regenerate them. The .py files in the repo are bad.

T4rk1n avatar Sep 20 '18 18:09 T4rk1n

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

rmarren1 avatar Sep 20 '18 19:09 rmarren1

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

rmarren1 avatar Sep 21 '18 15:09 rmarren1