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

can't load dash_html_components into Python 3.7 #55

Closed
bpostlethwaite opened this issue Aug 10, 2018 · 8 comments
Closed

can't load dash_html_components into Python 3.7 #55

bpostlethwaite opened this issue Aug 10, 2018 · 8 comments

Comments

@bpostlethwaite
Copy link
Member

can't load dash_html_components into Python 3.7

File "app.py", line 3, in <module>
    import dash_html_components as html
  File "/home/ben/.virtualenvs/spark-livy-dash/lib/python3.7/site-packages/dash_html_components/__init__.py", line 20, in <module>
    'dash_html_components'
  File "/home/ben/.virtualenvs/spark-livy-dash/lib/python3.7/site-packages/dash/development/component_loader.py", line 51, in load_components
    namespace
  File "/home/ben/.virtualenvs/spark-livy-dash/lib/python3.7/site-packages/dash/development/base_component.py", line 441, in generate_class
    exec(string, scope)
  File "<string>", line 44
    def __init__(self, children=None, id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, key=Component.UNDEFINED, role=Component.UNDEFINED, async=Component.UNDEFINED, charSet=Component.UNDEFINED, crossOrigin=Component.UNDEFINED, defer=Component.UNDEFINED, integrity=Component.UNDEFINED, src=Component.UNDEFINED, type=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, contentEditable=Component.UNDEFINED, contextMenu=Component.UNDEFINED, dir=Component.UNDEFINED, draggable=Component.UNDEFINED, hidden=Component.UNDEFINED, lang=Component.UNDEFINED, spellCheck=Component.UNDEFINED, style=Component.UNDEFINED, tabIndex=Component.UNDEFINED, title=Component.UNDEFINED, **kwargs):
                                                                                                                                                                                           ^
SyntaxError: invalid syntax

the app is literally just

import dash_html_components as html
@bpostlethwaite
Copy link
Member Author

bpostlethwaite commented Aug 10, 2018

dash_html_components version 0.11.0

@bpostlethwaite
Copy link
Member Author

@rmarren1 apparently you are working on a fix for this? Can you also check to see why testing didn't catch this?

@rmarren1
Copy link
Contributor

Yes fix is here with added tests: plotly/dash#325

The problem was the Python 3.7 async keyword, which overlapped with the async prop in html.Script. PR has a fix and a test case that would have caught this, also using Python 3.7 on tests would also help in the future.

@rmarren1
Copy link
Contributor

plotly/dash#327

@rmarren1
Copy link
Contributor

Fixed in dash==0.24.1

@kix2mix2
Copy link

I have dash=0.27.0 and I have the same issue. Is that normal? Should I downgrade?

@rmarren1
Copy link
Contributor

rmarren1 commented Sep 21, 2018

@kix2mix2 Theres an issue in dash-html-components==0.13.0/1 that has the same error. If you downgrade to dash-html-components==0.12.0 it should work with dash==0.27.0. Will have a patch out (dash-html-components==0.13.2) soon

@rmarren1
Copy link
Contributor

@kix2mix2 Fixed, should work with dash-html-components==0.13.2

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

No branches or pull requests

3 participants