Stacktrace on BIM project sample loading

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

Stacktrace on BIM project sample loading

Post by esteban.dugueperoux »

Hello FreeCAD community,

I follow https://wiki.freecadweb.org/Manual:BIM_modeling and as I encounter issue with dimension, I try to load the final result project, i.e. https://github.com/yorikvanhavre/FreeCA ... ouse.FCStd.
But when loading the file I get following stacktrace:

Code: Select all

08:21:26  Traceback (most recent call last):
  File "/usr/lib64/freecad/Mod/Arch/ArchSectionPlane.py", line 1086, in attach
    self.onChanged(vobj,"CutView")
  File "/usr/lib64/freecad/Mod/Arch/ArchSectionPlane.py", line 1162, in onChanged
    sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
<class 'AttributeError'>: getSceneGraph
08:21:26  Traceback (most recent call last):
  File "/usr/lib64/freecad/Mod/Arch/ArchSectionPlane.py", line 1106, in updateData
    self.onChanged(obj.ViewObject,"CutView")
  File "/usr/lib64/freecad/Mod/Arch/ArchSectionPlane.py", line 1162, in onChanged
    sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
<class 'AttributeError'>: getSceneGraph
I get the error on Linux Fedora 36 with FreeCAD 0.20 installed from Fedora official repos.
The 3D scene seems correctly displayed.

P.S.: I have attached the complete logs of BIM project loading.
Attachments
freecadBug.log
(6.96 KiB) Downloaded 21 times
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: Stacktrace on BIM project sample loading

Post by paullee »

Moved to Arch/BIM sub-forum hopefully for more exposure :)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Stacktrace on BIM project sample loading

Post by Kunda1 »

@esteban.dugueperoux thanks for the post. Please also add your full About info
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
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Stacktrace on BIM project sample loading

Post by Roy_043 »

Confirmed. It is related to how the file was saved (with the Drawing Page active). If you close the Page, save and reopen, the problem does not occur.

If the main view shows a Drawing Page there is an FreeCADGui.ActiveDocument.ActiveView object, but this object does not have a getSceneGraph method.

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
User avatar
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

Re: Stacktrace on BIM project sample loading

Post by esteban.dugueperoux »

It is strange because "Gnome Software" tells me that I have release 0.20.1 while FreeCAD itself indicates me 0.21:

Code: Select all

OS: Fedora Linux 36 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.Unknown
Build type: Unknown
Python 3.10.6, Qt 5.15.5, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.0
Locale: French/France (fr_FR)
Installed mods: 
  * parts_library.bak
  * fasteners 0.3.51
  * parts_library
  * A2plus 0.4.56a
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Stacktrace on BIM project sample loading

Post by Kunda1 »

It's a packaging issue. 0.21 is development release and is a moving target. So it should really be represented as 0.21.xxxxx (this variable correlate to the revision number, it's the number of commits you see when you look at FreeCAD/FreeCAD Github commits)
Screenshot_20220819_083657.png
Screenshot_20220819_083657.png (23.83 KiB) Viewed 857 times
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
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

Re: Stacktrace on BIM project sample loading

Post by esteban.dugueperoux »

User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Stacktrace on BIM project sample loading

Post by Kunda1 »

I believe it's on our end, issue #5945
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