Skip to content

CardImg fails to initialize #1125

Closed
Closed
@Gjjring

Description

@Gjjring

Before opening:

Please fill out the below information as much as possible.

  • dash version: #2.14.2
  • dash-bootstrap-components version: #2.0.2
  • components affected by bug: CardImg

What is happening?

When trying to create a CardImg object, the init function throws an exception.

What should be happening?

The CardImg object should initilize without an exception.

Code

import dash
import dash_bootstrap_components as dbc


app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP],
                suppress_callback_exceptions=True)

content =  [dbc.Row([
                dbc.Col(
                    dbc.Card([
                        dbc.CardImg(top=True),                            
                        ]),
                        width=8
                    )],
                    justify="center",
                ),                                
]
                

app.layout = dbc.Container(
    content,
    className = 'container')

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

Error messages

Traceback (most recent call last):
  File "D:\path\to\example\minimal_example.py", line 11, in <module>
    dbc.CardImg(top=True),
    ^^^^^^^^^^^^^^^^^^^^^
  File "D:\Python\miniforge3\envs\python3.12\Lib\site-packages\dash_bootstrap_components\_components\CardImg.py", line 85, in __init__
    _explicit_args = kwargs.pop('_explicit_args')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '_explicit_args'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions