Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rmarren1 opened this issue Aug 8, 2018 · 6 comments
Closed

Comments

@rmarren1
Copy link
Contributor

rmarren1 commented Aug 8, 2018

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: #325

@rmarren1
Copy link
Contributor Author

Fixed in dash==0.24.1

@rmbarley
Copy link

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.

@rmarren1
Copy link
Contributor Author

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

@T4rk1n
Copy link
Contributor

T4rk1n commented Sep 20, 2018

@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.

@rmarren1
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants