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

The new Blueprint-based assets breaks when two Dash apps try to use the same Flask instance #342

Closed
ned2 opened this issue Aug 20, 2018 · 0 comments · Fixed by #343
Closed
Assignees

Comments

@ned2
Copy link
Contributor

ned2 commented Aug 20, 2018

This was reported on the community forums.

import flask
import dash
import dash_html_components as html

server = flask.Flask(__name__)

app1 = dash.Dash(server=server, url_base_pathname='/app1/')
app1.layout = html.Div('app1')

app2 = dash.Dash(server=server, url_base_pathname='/app2/')
app2.layout = html.Div('app2')

if __name__ == '__main__':
    server.run()

The above example yields this error:

AssertionError: A name collision occurred between blueprints <flask.blueprints.Blueprint object at 0x7f945444ce80> and <flask.blueprints.Blueprint object at 0x7f943caa8278>. Both share the same name "assets". Blueprints that are created on the fly need unique names.

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

Successfully merging a pull request may close this issue.

2 participants