Skip to content

Regression: cannot load project library which contain no IfcProject ? #8183

@CyrilWaechter

Description

@CyrilWaechter

Bug Description

Error occurred when you try to load following attached project library:

  1. Create a new IFC project
  2. Load attached project library using Project Setup => Project Library => Select Library File from Project Overview tab.
  3. See error message

From my current understanding the issue occurred because there is no IfcProject in the IFC file. Although we have an IfcProjectLibrary. As far as I know having an IfcProject is not mandatory.

Attachments

Ifc file containing the project library: MinergieECO.zip

Debug and Error Output

Traceback (most recent call last):
  File "/home/cyril/.config/blender/5.1/extensions/.local/lib/python3.14/site-packages/bonsai/bim/module/project/prop.py", line 85, in get_project_libaries
    ProjectLibraryData.load()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/cyril/.config/blender/5.1/extensions/.local/lib/python3.14/site-packages/bonsai/bim/module/project/data.py", line 129, in load
    cls.data["parent_libraries_enum"] = cls.parent_libraries_enum()
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/cyril/.config/blender/5.1/extensions/.local/lib/python3.14/site-packages/bonsai/bim/module/project/data.py", line 165, in parent_libraries_enum
    project = library_file.by_type("IfcProject")[0]
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions