holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.8k stars 519 forks source link

AttributeError: 'Button' object has no attribute 'deepcopy' - when running Component Gallery > Widgets > Button in Panel 1.5.4 documentation #7506

Open jnareb opened 2 days ago

jnareb commented 2 days ago

ALL software version info

The error does appear in the Panel documentation, when tryin to run the code examples in https://panel.holoviz.org/reference/widgets/Button.html via "Run cell" button. At this time the most recent version of Panel is 1.5.4.

Software Version Info ```plaintext Chrome 130.0.6723.117 (64-bit) Windows 10 Home 22H2 (64-bit) ```

Description of expected behavior and the observed behavior

I wanted to see how the Button widget would behave with Python backend behind it, so on the Component Gallery > Widgets > Button page in Panel v1.5.4 user documentation I have clicked on "Run cell" button in the first cell, then clicked it again when asked "Click again to proceed".

Most cells executed just fine, and showed "Executed successfully" info message.

The three last cells however showed instead the following error message "AttributeError: 'Button' object has no attribute 'deepcopy'"

Example code cell in the documentation that exhibits this behavior

pn.Row(
    pn.widgets.Button(icon='alert-triangle-filled', button_type='warning', name='WARNING'),
    pn.widgets.Button(icon='bug', button_type='danger', name='Error')
)

Stack traceback and/or browser JavaScript console output

AttributeError: 'Button' object has no attribute 'deepcopy'

Screenshots or screencasts of the bug in action

panel_documentation-component_gallery-button-error_running_cells-screenshot.png