Dash Mantine Multi-Page Error

I’m building a Dash (2.18.2) app with the Mantine Components package with a multi-page layout. I’m getting this strange error message: dash.exceptions.NoLayoutException: No layout in module main in dash.page_registry. Any ideas what would cause this? One caveat: I’m able to successfully run my app in an environment where dmc v0.15.1 is installed. The error I’m encountering is with an environment that has v0.15.3. Not sure if that could make a difference or not…

Hi @adiadidas15

That’s odd. It should work just fine. The dmc documentation site is a Dash multi page app running dmc 0.15.3 and dash 2.18.2

Can you make a minimal example that replicates the error that I can run?

Thanks for the quick response @AnnMarieW! My problem is that I have one Python environment (built with pip) that runs successfully and another (built with mamba) that doesn’t. The Dash code is identical. I guess I will start with a minimal Dash app run in the mamba environment and see what components I can add until it replicates the error…

I’m not sure what the exact culprit was for my error but I found two bugs that might have been the cause:

  • app.py mistakenly had dash.register_page(__name__)
  • The dmc.Navlink items for my pages had hard coded relative HREFs. They worked fine for my local testing but when I deployed the app to Posit Connect, these links broke. I had to follow their example code.