I am trying to make a callback on an app that pulls data from an sql server. I can pull the data just fine into a pandas dataframe and format it into a Dash graph. However, if I add a callback (even one of the example callbacks for a simple button that returns text, not connected to my graph other than being on the same page) then I receive the following error:
TypeError: update_output() got an unexpected keyword argument ‘long_callback_manager’
This is what I have included in the file:
import pandas.io.sql import pyodbc import pandas as pd import plotly.express as px from datetime import date from dash import Dash, dcc, html, DiskcacheManager from dash.dependencies import Input, Output, State
I figured that maybe it wanted me to do a long_callback, so I setup the background manager by following the Dash tutorial page:
import diskcache cache = diskcache.Cache("./cache") background_callback_manager = DiskcacheManager(cache)
And then setup the callback to be a background callback, but it still doesn’t work. The strange part is that even when I copied the tutorial basic callback and had it display at the top of the page above my graph, it still didn’t work (but if I just paste the tutorial code by itself in a py file, it works perfectly). Do callbacks not work if pyodbc is used on the page?