Skip to content
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

add check that dash was correctly imported and exit with helpful message if failed #177

Merged
merged 3 commits into from Mar 30, 2018

Conversation

Projects
None yet
2 participants
@ned2
Copy link
Contributor

commented Mar 26, 2018

A common gotcha that people new to Dash encounter is naming their script 'dash.py' which then shadows the Dash package itself, causing unhappy times. This adds an explicit check that the dash.development attribute exists, which if it doesn't, it's likely this situation has happened, so a more helpful error message is printed to standard error, and the script exits.

This catches at least some of the times that this error occurs. If we also change the import order for example code from the Dash User guide to make from dash.dependencies import Input, State, Output come after after the import of dash_core_components this will then catch a lot more.

@ned2 ned2 changed the title add check that dash was correctly imported and exit with helpful message if not add check that dash was correctly imported and exit with helpful message if failed Mar 26, 2018

@ned2

This comment has been minimized.

Copy link
Contributor Author

commented Mar 30, 2018

@chriddyp

This comment has been minimized.

Copy link
Member

commented Mar 30, 2018

perfect 👌

@chriddyp chriddyp merged commit c2099c8 into plotly:master Mar 30, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.