Something seems to have changed or broken between Dash v1.12 and Dash v1.13, with regards to dcc.Location and dynamic layouts
In Dash 1.12, the following works:
if pathname == ‘/apps/cumulative_pnl’:
cumulative_pnl.py looks like:
from dash.dependencies import Input, Output, State import dash_html_components as html import dash_core_components as dcc import datetime from . import render_graphs from app import app def return_layout(): return html.Div( [ datetime.datetime.now(), dcc.Location(id='url', refresh=False), ], )
each time I go to /apps/cumulative_pnl, the return_layout function is invoked and my layout renders once, showing the datetime as of page load
In Dash 1.13, it seems to get stuck in an infinite loop, triggering over and over, with the datetime continually updating.