Bug #114320 Call copy.deepcopy() on grt.Dict: KeyError 'grt.Dict key must be a string'
Submitted: 12 Mar 2024 11:47 Modified: 13 Apr 2024 12:22
Reporter: Karsten Wutzke Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:8.0.36 OS:Windows (11)
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: workbench

[12 Mar 2024 11:47] Karsten Wutzke
Description:
I am able to crash MySQL Workbench with a simple set of actions:

1. Start Workbench
2. "File" menu -> "New Model"
3. "Scripting" menu -> "Scripting Shell" (new window opening)
4. In the "Shell" tab, see command line (white input text) below, execute:

    import copy
    copied_custom_data = copy.deepcopy(grt.root.wb.doc.physicalModels[0].catalog.customData)

This results in:

Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\Python\Lib\copy.py", line 151, in deepcopy
    copier = getattr(x, "__deepcopy__", None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'grt.Dict key must be a string'

--

Here's the complete dump from the "Shell" tab:

Type '?' for help.
Python Shell initialized.
>>> import copy
... copied_custom_data = copy.deepcopy(grt.root.wb.doc.physicalModels[0].catalog.customData)
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\Python\Lib\copy.py", line 151, in deepcopy
    copier = getattr(x, "__deepcopy__", None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'grt.Dict key must be a string'

How to repeat:
See description.
[13 Mar 2024 12:22] MySQL Verification Team
Hello Karsten Wutzke,

Thank you for the bug report.
To investigate further this issue at our end, may I kindly request you to launch workbench under debug mode (--log-level=debug3) and provide unaltered workbench log file(more details about log are explained here - https://dev.mysql.com/doc/workbench/en/workbench-reporting-bugs.html)?

Regards,
Ashwini Patil
[14 Apr 2024 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".