Giter VIP home page Giter VIP logo

Comments (6)

huong-li-nguyen avatar huong-li-nguyen commented on May 23, 2024 2

Just checked and it got fixed with dash==2.16.1 for us! Thank you @T4rk1n for fixing it so quickly - really appreciate it! 🚀

from dash.

huong-li-nguyen avatar huong-li-nguyen commented on May 23, 2024 1

That seems to be the full trace:

error.js:16 Error: dash_mantine_components was not found.
    at Object.resolve (registry.js:15:15)
    at validateProp (dependencies.js:491:34)
    at validateMap (dependencies.js:567:21)
    at validateCallbacksToLayout (dependencies.js:579:5)
    at index.js:32:34
    at index.js:16:1
    at APIController.react.js:216:17
    at batchedUpdates$1 ([email protected]_16_0m1709562287.14.0.js:21991:14)
    at storeEffect (APIController.react.js:161:10)
    at commitHookEffectListMount ([email protected]_16_0m1709562287.14.0.js:19866:28)
error @ error.js:16

The first mantine component is added like this - however, I think it's on our side as the below code works fine in a pure Dash app 🤔

html.Div(
            dmc.Switch(
                id="theme_selector",
                checked=True,
                persistence=True,
                persistence_type="session",
                className="toggle-switch",
            ),
            id="settings",
        )

from dash.

antonymilne avatar antonymilne commented on May 23, 2024 1

I think this should be a MRE. Basically you need to use Dash pages to see the bug I think:

from dash import Dash, dcc, html, Input, Output, callback
import dash_bootstrap_components as dbc

app = Dash(__name__, use_pages=True, pages_folder="")
server = app.server  # expose server variable for Procfile

def layout():
    return html.Div([
    dbc.Button('Click me!', id='button'),
    html.Div('The button has not been clicked yet', id='out')
])

# Error also exists for clientside callbacks
@callback(
    Output('out', 'children'),
    Input('button', 'n_clicks'),
    prevent_initial_call=True
    )
def update_graph(n_clicks):
    return f"Button has been clicked {n_clicks} times"

dash.register_page("page", path="/", layout=layout())

app.layout = dash.page_container

if __name__ == '__main__':
    app.run(debug=True)

As you can see, it's not specific to dash mantine since the above uses dash_boostrap_components and gives the same error, and we have also seen it for AG Grid. dash.html and dash.dcc seem to work ok though.

from dash.

celia-lm avatar celia-lm commented on May 23, 2024

Hi @huong-li-nguyen this MRE works for me, can you test it in your environment?

from dash import Dash, dcc, html, Input, Output, callback
import dash_mantine_components as dmc

app = Dash(__name__)
server = app.server  # expose server variable for Procfile

app.layout = dmc.MantineProvider([
    dmc.Button('Click me!', id='button'),
    html.Div('The button has not been clicked yet', id='out')
])

@callback(
    Output('out', 'children'),
    Input('button', 'n_clicks'),
    prevent_initial_call=True
    )
def update_graph(n_clicks):
    return f"Button has been clicked {n_clicks} times"

if __name__ == '__main__':
    app.run(debug=True)

requirements.txt

dash                    2.16.0
dash_ag_grid            31.0.1
dash-core-components    2.0.0
dash-design-kit         1.9.0
dash-html-components    2.0.0
dash-mantine-components 0.12.1
dash-table              5.0.0

I'm going to test progressively adding the other libraries in your requirements.txt.

from dash.

huong-li-nguyen avatar huong-li-nguyen commented on May 23, 2024

Hey @celia-lm - thanks for your swift reply!

It does work without any issues, so it must be something with our environment then 🤔 Thanks for checking though - much appreciated!

We'll try to investigate on our side then. By any chance - do you have a clue from the error message what the potential issue could be?

from dash.

T4rk1n avatar T4rk1n commented on May 23, 2024

Could we get the full stacktrace from the browser.

How is the first dmc component inserted in the layout?

from dash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.