Title: Changing an element's spatial container causes an error · Issue #7801 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Changing an element's spatial container causes an error · Issue #7801 · IfcOpenShell/IfcOpenShell
X Title: Changing an element's spatial container causes an error · Issue #7801 · IfcOpenShell/IfcOpenShell
Description: Bug Description Open file Problem.ifc.txt Select Wall Navigate to Object Information Tab Change the Spatial Container of the Wall to IfcBuildingStorey/OG_02 Attachments I see this error: os: Windows os_version: 10.0.19045 python_version:...
Open Graph Description: Bug Description Open file Problem.ifc.txt Select Wall Navigate to Object Information Tab Change the Spatial Container of the Wall to IfcBuildingStorey/OG_02 Attachments I see this error: os: Window...
X Description: Bug Description Open file Problem.ifc.txt Select Wall Navigate to Object Information Tab Change the Spatial Container of the Wall to IfcBuildingStorey/OG_02 Attachments I see this error: os: Window...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/7801
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Changing an element's spatial container causes an error","articleBody":"### Bug Description\n\n1. Open file [Problem.ifc.txt](https://github.com/user-attachments/files/26019811/Problem.ifc.txt)\n2. Select Wall\n3. Navigate to Object Information Tab\n4. Change the Spatial Container of the Wall to IfcBuildingStorey/OG_02\n\n\n\n### Attachments\n\nI see this error:\n```\nos: Windows\nos_version: 10.0.19045\npython_version: 3.11.11\narchitecture: ('64bit', 'WindowsPE')\nmachine: AMD64\nprocessor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel\nblender_version: 4.5.0\nbonsai_version: 0.8.5-alpha260315\nbonsai_commit_hash: 1999d93\nbonsai_commit_date: 2026-03-16T07:30:49+11:00\nlast_actions: \n# operator: BIM_OT_assign_container\n# ifcopenshell.api: spatial.assign_container\n>>> {\"products\": [{\"cast_type\": \"entity_instance\", \"value\": 18331, \"Name\": \"Wall\"}], \"relating_structure\": {\"cast_type\": \"entity_instance\", \"value\": 25311, \"Name\": \"OG_02\"}}\n# ifcopenshell.api: aggregate.unassign_object\n>>> {\"products\": \"[]\"}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 25183, \"Name\": null}}\n# ifcopenshell.api: owner.create_owner_history\n>>> {}\n# ifcopenshell.api: geometry.edit_object_placement\n>>> {\"product\": {\"cast_type\": \"entity_instance\", \"value\": 18331, \"Name\": \"Wall\"}, \"matrix\": {\"cast_type\": \"ndarray\", \"value\": [[1.57324599048209e-13, 1.0, 0.0, 0.862274935870782], [-1.0, 1.57324599048209e-13, 0.0, -6.80189971535034], [0.0, 0.0, 1.0, 2.92], [0.0, 0.0, 0.0, 1.0]]}, \"is_si\": \"False\"}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 18331, \"Name\": \"Wall\"}}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 18529, \"Name\": \"Fenster\"}}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 18748, \"Name\": \"Fenster\"}}\n# operator: BIM_OT_save_project\n# operator: BIM_OT_save_project\n# operator: BIM_OT_assign_container\n# ifcopenshell.api: spatial.assign_container\n>>> {\"products\": [{\"cast_type\": \"entity_instance\", \"value\": 18331, \"Name\": \"Wall\"}], \"relating_structure\": {\"cast_type\": \"entity_instance\", \"value\": 25311, \"Name\": \"OG_02\"}}\n# ifcopenshell.api: aggregate.unassign_object\n>>> {\"products\": \"[]\"}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 25183, \"Name\": null}}\n# ifcopenshell.api: owner.create_owner_history\n>>> {}\n# ifcopenshell.api: geometry.edit_object_placement\n>>> {\"product\": {\"cast_type\": \"entity_instance\", \"value\": 18331, \"Name\": \"Wall\"}, \"matrix\": {\"cast_type\": \"ndarray\", \"value\": [[1.57324599048209e-13, 1.0, 0.0, 0.862274935870782], [-1.0, 1.57324599048209e-13, 0.0, -6.80189971535034], [0.0, 0.0, 1.0, 2.92], [0.0, 0.0, 0.0, 1.0]]}, \"is_si\": \"False\"}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 18331, \"Name\": \"Wall\"}}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 18529, \"Name\": \"Fenster\"}}\n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 18748, \"Name\": \"Fenster\"}}\nlast_error: Traceback (most recent call last):\n File \"C:\\Users\\user\\AppData\\Roaming\\Blender Foundation\\Blender\\4.5\\extensions\\.local\\lib\\python3.11\\site-packages\\bonsai\\bim\\ifc.py\", line 528, in execute_ifc_operator\n result = getattr(operator, \"_execute\")(context)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"C:\\Users\\user\\AppData\\Roaming\\Blender Foundation\\Blender\\4.5\\extensions\\.local\\lib\\python3.11\\site-packages\\bonsai\\bim\\module\\spatial\\operator.py\", line 174, in _execute\n core.assign_container(\n File \"C:\\Users\\user\\AppData\\Roaming\\Blender Foundation\\Blender\\4.5\\extensions\\.local\\lib\\python3.11\\site-packages\\bonsai\\core\\spatial.py\", line 70, in assign_container\n collector.assign(ifc.get_object(element))\n File \"C:\\Users\\user\\AppData\\Roaming\\Blender Foundation\\Blender\\4.5\\extensions\\.local\\lib\\python3.11\\site-packages\\bonsai\\tool\\collector.py\", line 32, in assign\n for users_collection in obj.users_collection:\n ^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'users_collection'\n\nblend_file_path: Not saved\nblend_file_dirty: N/A\nifc_file_path: C:/Users/user/Desktop/PROBLEM/Problem_test.ifc\nifc_is_dirty: True\nifc: Problem_test.ifc\nschema: IFC4\npreprocessor_version: IfcOpenShell 0.8.5-alpha260315\noriginating_system: Bonsai 0.8.5-alpha260315-1999d93\n```\nI'm using Blender 4.5.0\nThe file was originally created with Allplan and then reduced to only the problematic elements.\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/balrobs","@type":"Person","name":"balrobs"},"datePublished":"2026-03-16T10:24:29Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/7801"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6d458518-d022-5cd3-f46b-62c91899139e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 839E:2130A1:76DDBD:A38C2B:6B04A9FE |
| html-safe-nonce | e42bf5da7c8998f48b34c97e9f5876f150e3cdaa220ed5c4cc93de0b2bb953e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzlFOjIxMzBBMTo3NkREQkQ6QTM4QzJCOjZCMDRBOUZFIiwidmlzaXRvcl9pZCI6IjIyNTI0NzYwODgxNDYyNDIwNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fd55c78ec9fd10417f885273ca806652daa12b1f7ef1432b8cc12e21a5b4fb73 |
| hovercard-subject-tag | issue:4081586582 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/7801/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4877fb88614f524cc2444045e43a907ead8d535a8fbdf3c5e2e6c9b1955355d7/IfcOpenShell/IfcOpenShell/issues/7801 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4877fb88614f524cc2444045e43a907ead8d535a8fbdf3c5e2e6c9b1955355d7/IfcOpenShell/IfcOpenShell/issues/7801 |
| og:image:alt | Bug Description Open file Problem.ifc.txt Select Wall Navigate to Object Information Tab Change the Spatial Container of the Wall to IfcBuildingStorey/OG_02 Attachments I see this error: os: Window... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | balrobs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width