I tried to deploy my dashboard on a web service which I had already try my dash app on my computer and it worked well. The web service is successfully built. However, there’s nothing showing on the web page. It gave me some errors:
dash.exceptions.NoLayoutException: The layout was None
at the time that run_server
was called.
Make sure to set the layout
attribute of your application
I would also paste some files for anyone to help me locate where the error might be.
The web-service link:
https://traffic-dashboard.onrender.com
app.py
import dash
app = dash.Dash(__name__, suppress_callback_exceptions=True)
server = app.server
init.py
from app import app
from layouts import Layout
from callbacks import *
app.layout = Layout
if __name__ == '__main__':
app.run_server(debug=False)
layouts.py
import pandas as pd
from dash import Dash, dcc, html
...
Layout = html.Div([side_bar,main_content],className = 'page')
I’m new to this tool, so any kind help would be great.
Sincerely,
Harry