Error ModalTitle from dash_bootstrap_components

Hello to All,

hope everybody doing great

I have app I developed on my windows laptop. After I finished, I moved it to macbookpro where I faced all problems in dependences. I solved it all except dash_bootstrap_components. even thou I install last version 0.13.1 but it gave me this error : AttributeError: module ‘dash_bootstrap_components’ has no attribute ‘ModalTitle’

thanks in advance.

There is no ModalTitle component in version 0.13.1, did you mean to use ModalHeader?

Hi @saeed

I believe it’s because v1 of dash-bootstrap-components was released a few months ago, and prior to this, the ModalTitle element didn’t exist. You can find the migration guide here: Migration guide - dbc docs

The latest version is v1.1.0.

You can find examples on how to use the ModalTitle component in the docs if you haven’t used it already: Modal - dbc docs

Hope this helps!

there is and links provide it by @glsdown thanks to her

thanks for replaying to my Q. I followed the guide and worked with me in Windows but when I moved it to mac it did not work any more. also the latest was 0.13.1

It sounds like v1 might have been installed without you realising on the windows machine, but that if you had v0.13.1 fixed in your requirements file, when you moved over to mac, it installed the older version. Try installing the latest version on the Mac and checking it works. ModalTitle will never work in v0.13.1 because we only added it when v1 was released.

1 Like

thank you very much, I installed v=1.0.1 and it did not work. wired that they put in there guide this command "pip install “dash-bootstrap-components<1"” for latest V which get me V0.13.1??

In our migration guide, it says:

To install the last v0 release of dash-bootstrap-components from PyPI use pip install "dash-bootstrap-components<1"

This is to allow people who don’t want to migrate to v1 to still use the older version so they don’t have to migrate to Bootstrap 5 or Dash 2. This is what installs v0.13.1.

However, as you want to use the ModalTitle component, you need to install a version which is at least v1. So you need to use the standard install line as documented in the Quickstart documentation. Specifically:

You can install dash-bootstrap-components with pip:

pip install dash-bootstrap-components

You can use the standard pip notation to denote specific versions too. You can find all versions (including prereleases) on PyPI

thanks, I think I found the problem I uninstalled dash-bootstrap-components and delete ModalTitle and the app worked. so the app reads from somewhere else and it has to be old V.

do you know where can i find it and delete it?

I try sudo pip uninstall dash-bootstrap-components and it didn’t work

or it is possible it comes included with other library

It will very much depend on your set up and whether you are using something like anaconda etc. you can find out where pip is installed on a Mac using which pip which might help you to work out what to search for online.

thank you very much @glsdown
I was using pip instead on pip3

1 Like