Skip to content

3.0.6 TypeError: Object of type PenStyle is not JSON serializable #3788

@AugustoRubio

Description

@AugustoRubio

Describe the bug
When I try turn any cable to invisible, the application gives me a error and a crash report. The option not close after the confirmation, and when I close the project and come back, the cable its visible again.
This project I import from the version 3.0.5 and I think this maybe a problem, but I try create another project and the error persist.

GNS3 version and operating system (please complete the following information):

  • OS: Windows 11 PRO
  • GNS3 version: 3.0.6
  • Remote Server Linux Debian 13 (trixie), GNS 3.0.6

To Reproduce
Steps to reproduce the behavior:

  1. Open the style menu off any cable.
  2. Put the border style in "Invisible" and confirm.

Screenshots or videos

Image

Image

Log view:
****** Exception detected, traceback information saved in C:\Users****\AppData\Roaming\GNS3\3.0\exceptions.log ******

Traceback (most recent call last):
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\dialogs\style_editor_dialog_link.py", line 119, in done
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\dialogs\style_editor_dialog_link.py", line 108, in applyPreferencesSlot
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\items\link_item.py", line 154, in setLinkStyle
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\link.py", line 177, in update
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\controller.py", line 199, in put
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\controller.py", line 244, in request
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\http_client.py", line 354, in sendRequest
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\qt_init
.py", line 182, in partial
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\http_client.py", line 728, in _executeHTTPQuery
File "C:\Users\circleci\project\Windows\gns3-gui\gns3\http_client.py", line 378, in addBodyToRequest
File "C:\python311\Lib\json_init
.py", line 231, in dumps
File "C:\python311\Lib\json\encoder.py", line 200, in encode
File "C:\python311\Lib\json\encoder.py", line 258, in iterencode
File "C:\python311\Lib\json\encoder.py", line 180, in default
TypeError: Object of type PenStyle is not JSON serializable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions