Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using some node symbols leads to exception in "node_item.py" - "argument 1 has unexpected type 'float'" #3282

Closed
andrei-korshikov opened this issue Jan 13, 2022 · 1 comment
Labels
Milestone

Comments

@andrei-korshikov
Copy link

Describe the bug
Using some node symbols produces the following error :

Traceback (most recent call last):
File "/home/korshikov/-.software/GNS3/lib/python3.10/site-packages/gns3/items/node_item.py", line 510, in paint
painter.drawRect((brect.width() / 2.0) - 10, (brect.height() / 2.0) - 10, 20, 20)
TypeError: arguments did not match any overloaded call:
drawRect(self, QRectF): argument 1 has unexpected type 'float'
drawRect(self, int, int, int, int): argument 1 has unexpected type 'float'
drawRect(self, QRect): argument 1 has unexpected type 'float'

2022-01-13 15:36:59 INFO crash_report:150 Crash report sent with event ID: c38a41cc1372435a9c8f180d916e8867`

Some affected symbols:

  • Affinity-cicrce-blue - atm
  • Affinity-square-gray - switch

Some unaffected symbols:

  • Affinity-cicrce-blue - router2
  • Affinity-square-blue - laptop

If I close the project, open another one, and then reopen the project with problematic symbols (without exiting GNS3) - then this exception isn't thrown. This behavior is stable and reproducible.

GNS3 version and operating system:

  • OS: Arch Linux (Linux laptop 5.15.13-zen1-1-zen # 1 ZEN SMP PREEMPT Wed, 05 Jan 2022 16:21:01 +0000 x86_64 GNU/Linux)
  • GNS3 version: 2.2.29
  • Python version: 3.10.1
  • No use of the GNS3 VM or remote server

To Reproduce

  1. Start GNS3. In the "Project" dialog select "Projects library" and open the project with affected symbols.
  2. See the error.
  3. Open another (for example, empty) project.
  4. Reopen the project with affected symbols.
  5. See there is no error.
  6. Close GNS3 and start it once again. Open the problematic project.
  7. See there is the same error.

Additional context
I've seen some issues (for example, #3281) with the same error message - "argument 1 has unexpected type 'float'".

@grossmj
Copy link
Member

grossmj commented Jan 15, 2022

Fixed, thanks 👍

@grossmj grossmj closed this as completed Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants