Hello world fails when dash_mantine_components is installed

When I install the latest version of the dash_mantine_components module, my existing app fails with the following message.

Traceback (most recent call last):
  File "./bla.py", line 14, in <module>
    _app = Dash()
  File ".../dash_extensions/enrich.py", line 1289, in __init__
    LogTransform(),
  File ".../dash_extensions/enrich.py", line 629, in __init__
    log_config = setup_notifications_log_config(self.components)
  File ".../dash_extensions/enrich.py", line 561, in setup_notifications_log_config
    layout.append(dmc.NotificationsProvider(id="notifications_provider"))
  File ".../dash/development/base_component.py", line 425, in wrapper
    return func(*args, **kwargs)
  File ".../dash_mantine_components/NotificationsProvider.py", line 53, in __init__
    super(NotificationsProvider, self).__init__(children=children, **args)
  File ".../dash/development/base_component.py", line 133, in __init__
    raise TypeError(
TypeError: The `dash_mantine_components.NotificationsProvider` component (version 0.11.0) with the ID "notifications_provider" received an unexpected keyword argument: `id`
Allowed arguments: autoClose, children, containerWidth, limit, notificationMaxHeight, position, transitionDuration, zIndex

Code

from dash_extensions.enrich import Dash

if __name__ == '__main__':
    _app = Dash()

It looks like the LogTransform extension is not compatible with the latest version of dash_mantine_componenets

Versions used

dash==2.7.1
dash-bootstrap-components==1.1.0
dash-core-components==2.0.0
dash-daq==0.5.0
dash-extensions==0.1.8
dash-html-components==2.0.0
dash-iconify==0.1.2
dash-mantine-components==0.11.0
dash-table==5.0.0

Any idea on how can I fix this

I can get going without the LogTransform by using DashProxy instead of Dash in above code, but the app uses LogTransform

This issue is due to breaking changes introduced in the latest version of dash-mantine-components. The default logging configuration uses the old syntax. I’ll update the library when I find some time to use the new syntax. Until then, you can disable dmc,

LogTransform(try_use_mantine=False)

or pass a custom implementation via the log_config kwarg.

2 Likes

I just made an intial implementation and pushed it as version 0.1.9rc1. You can try it out if you like :slight_smile:

1 Like

I have now pushed version 0.1.9, which should fix the issue.

1 Like