[FIXED] Ticket #4453 - Problem to removing references in a PropertyLinkListGlobal

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
walpa
Posts: 65
Joined: Wed Nov 09, 2016 5:22 pm
Location: Brazil

[FIXED] Ticket #4453 - Problem to removing references in a PropertyLinkListGlobal

Post by walpa »

HI,

I don't know if it's a bug or I'm doing something wrong.

When trying to clear the property links, the exception is generated:
<Exception> type must be 'DocumentObject' or list of 'DocumentObject', not NoneType
And the link persists.

The attached script shows the situation:
- copy the script to the ./FreeCAD/Macro folder
- open the FC
- run the script
- create the link in the "Operates On" property
- try removing this link

phpBB [video]



OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22611 (Git) AppImage
Build type: Release
Branch: master
Hash: 7eeec7a5990cc786723225ca8de16ca3186545b3
Python version: 3.8.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Portuguese/Brazil (pt_BR)

Please, guide me!
Thank you for your help!
Attachments
test_PropertyLinkListGlobal.py
(2.61 KiB) Downloaded 36 times
Last edited by Kunda1 on Sat Nov 21, 2020 4:27 pm, edited 2 times in total.
Reason: Added [Fixed] to thread title
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Problem to removing references in a PropertyLinkListGlobal

Post by vocx »

walpa wrote: Wed Oct 07, 2020 9:53 pm When trying to clear the property links, the exception is generated:
<Exception> type must be 'DocumentObject' or list of 'DocumentObject', not NoneType
This looks like a bug.

It works fine from the Python console, so the error is only triggered when trying to clear the property by the property editor and Link dialog.

Code: Select all

App.ActiveDocument.test.SomeProperty = []
wmayer wrote: ping
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
walpa
Posts: 65
Joined: Wed Nov 09, 2016 5:22 pm
Location: Brazil

Re: Problem to removing references in a PropertyLinkListGlobal

Post by walpa »

Thanks @vocx and @wmayer for the quick response.

Created ticket 0004453 in bug tracker.

I look forward to the solution. :)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4453 - Problem to removing references in a PropertyLinkListGlobal

Post by Kunda1 »

Linking to ticket: issue #4453 + added ticket number to thread title
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ticket #4453 - Problem to removing references in a PropertyLinkListGlobal

Post by chennes »

Kunda1 wrote: Thu Oct 08, 2020 1:31 pm Linking to ticket: issue #4453 + added ticket number to thread title
I think I got this fixed with https://github.com/FreeCAD/FreeCAD/pull/4036. Just a one-liner, converting an empty link list from "None" to "[]".

ETA: For posterity's sake, that turned out to not be the fix after all, but @yorikvanhavre and @wwmayer got me straightened out :).
Last edited by chennes on Sat Nov 21, 2020 5:51 pm, edited 1 time in total.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [FIXED] Ticket #4453 - Problem to removing references in a PropertyLinkListGlobal

Post by Kunda1 »

git commit 031619db
Marked thread as [FIXED]
Thank you @chennes
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply