✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Bug introduced in Dash v1.13.0 from dash v1.12.0? dcc.Location refreshes continuously even with refresh=False

Hello,

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:

@app.callback(Output(‘page-content’, ‘children’),
[Input(‘url’, ‘pathname’)])
def display_page(pathname):
if pathname == ‘/apps/cumulative_pnl’:
return cumulative_pnl.return_layout()

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.