title: Getting a 500 Internal server error dash with plotly
body: <p>I am trying to create a dashboard with the python libraries <code>dash</code> and <code>plotly</code>. I have successfully created a static html dashboard, but when I try to add a plotly graph instead of plain html I get a <code>500 Internal Server Error</code>. My code is as follows:</p>
  
  <pre class="lang-py prettyprint-override"><code>import dash
  import dash_html_components as html
  import dash_core_components as dcc
  import plotly.graph_objs as go
  import numpy as np
  
  app = dash.Dash()
  
  # Creating data
  
  np.random.seed(42)
  random_x = np.random.randint(1, 100, 100)
  random_y = np.random.randint(1, 100, 100)
  
  data = [go.Trace(
      x = random_x,
      y = random_y,
      mode = 'lines'
  )]
  
  layout = go.Layout(title = 'bello')
  
  
  app.lyaout = html.Div([dcc.Graph(id = 'lineplot', figure = {'data': data, 'layout': layout})])
  
  if __name__ == '__main__':
      app.run_server()
  </code></pre>
  
  <p>This outputs this when I try to access the webpage:</p>
  
  <pre class="lang-sh prettyprint-override"><code>raise exceptions.NoLayoutException(
  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
  before running the server.
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>