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

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

ned2
Copy link
Contributor

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

ned2 commented Mar 30, 2018

This mirrors the changes in both plotly/dash-html-components#39 and plotly/dash-components-archetype#42

@chriddyp
Copy link
Member

perfect 👌

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

Successfully merging this pull request may close these issues.

2 participants