Prevent Circular Dependencies Ui Error Message in Plotly Dash

Prevent Circular Dependencies Ui Error Message in Plotly Dash

I have recursive elements in my Dash program that are well-handled and are never at risk of infinite recursion. Unfortunately, a box pops up on my app telling me I have a recursion. How do I stop this warning from showing?

3 Answers

The Dash message about circular dependencies can be suppressed. It is controlled by the "circular" parameter passed to the DepGraph() function within dash-renderer. I had the same problem and resolved it by opening dash_renderer.min.js within Python's site-packages/dash_renderer directory, searching for "DepGraph", and replacing the string "this.circular=e&&!!e.circular" by "this.circular=true" just inside the call. I was led to this solution by postings here and here.

Change the debug to False in the main function call

if __name__ == '__main__':
    app.run_server(debug=False)

I saw the error while working with two callbacks: one taking a 'value' of an element as input/output, the second only taking the 'value' as output. The error occured when i implemented the second-callback and disappeared when i changed the input from the first one to 'state' - perhaps this helps anyone.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.