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

BIM: Error when switching to strict IFC mode in 1.1dev #18011

Closed
2 tasks done
semhustej opened this issue Nov 20, 2024 · 7 comments
Closed
2 tasks done

BIM: Error when switching to strict IFC mode in 1.1dev #18011

semhustej opened this issue Nov 20, 2024 · 7 comments
Assignees
Labels
File format: IFC Mod: BIM Related to the BIM/Arch Workbench Status: Needs test on dev version Missing test on the weekly version Type: Bug This issue or PR is related to a bug

Comments

@semhustej
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Steps to reproduce:

  • Open a new file
  • Switch project to Strict IFC mode
  • Error shows up
18:43:06  Traceback (most recent call last):
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\Mod\BIM\nativeifc\ifc_status.py", line 70, in on_toggle_lock
18:43:06      lock_document()
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\Mod\BIM\nativeifc\ifc_status.py", line 188, in lock_document
18:43:06      from nativeifc import ifc_tools  # lazy loading
18:43:06      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
18:43:06      return original_import(name, *args, **kwargs)
18:43:06             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\Mod\BIM\nativeifc\ifc_tools.py", line 36, in <module>
18:43:06      from ifcopenshell import geom
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
18:43:06      return original_import(name, *args, **kwargs)
18:43:06             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\bin\Lib\site-packages\ifcopenshell\geom\__init__.py", line 55, in <module>
18:43:06      from . import occ_utils as utils
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
18:43:06      return original_import(name, *args, **kwargs)
18:43:06             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\bin\Lib\site-packages\ifcopenshell\geom\occ_utils.py", line 27, in <module>
18:43:06      from typing_extensions import assert_never
18:43:06    File "C:\Users\semhu\Documents\tyo\BF\FreeCAD\FC_daily\FreeCAD_weekly-builds-39240-conda-Windows-x86_64-py311\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
18:43:06      return original_import(name, *args, **kwargs)
18:43:06             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:43:06  ModuleNotFoundError: No module named 'typing_extensions'

Full version info

OS: Windows 10 build 19045
Architecture: x86_64
Version: 1.1.0dev.39240 (Git) Conda
Build type: Release
Branch: main
Hash: f9ba94c70b139ece6ba5ffba47632d91b5c9c645
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: English/United States (en_US) [ OS: English/United States (en_US) ]
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/Qt default

Subproject(s) affected?

BIM

Anything else?

I am not able to reproduce the issue with FC 1.0, it seems like a regression.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@semhustej semhustej added the Status: Needs triage Missing triage label Nov 20, 2024
@maxwxyz maxwxyz added Type: Bug This issue or PR is related to a bug Mod: BIM Related to the BIM/Arch Workbench File format: IFC and removed Status: Needs triage Missing triage labels Nov 21, 2024
@yorikvanhavre
Copy link
Member

Hmm typing_extensions is a non-builtin python module, and it seems to be required by ifcopenshell.

@Andrej730 can you confirm? We might need to start adding it to the FreeCAD bundle...

@Andrej730
Copy link

@yorikvanhavre Hi! Yes, I can confirm, typing-extensions is required since we use some typing features from newer Python versions and we still support Python 3.9-3.10.

@yorikvanhavre
Copy link
Member

Thanks @Andrej730 !

@adrianinsaval is it doable to include python3-typing-extensions in our packages?

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 7, 2025

Is this still an issue in latest weekly with #18769 ?

@maxwxyz maxwxyz added the Status: Needs test on dev version Missing test on the weekly version label Jan 7, 2025
@semhustej
Copy link
Author

I did a test and the issue seems to be fixed on my side with the latest weekly. When reproducing, I only get this information (no errors):

12:23:12  Note: API not available due to missing dependencies: geometry.add_door_representation - No module named 'mathutils'
12:23:12  Note: API not available due to missing dependencies: geometry.add_railing_representation - No module named 'mathutils'
12:23:12  Note: API not available due to missing dependencies: geometry.add_representation - No module named 'bpy'
12:23:12  Note: API not available due to missing dependencies: geometry.add_window_representation - No module named 'mathutils'
12:23:12  Note: API not available due to missing dependencies: grid.create_axis_curve - No module named 'mathutils'
12:23:12  DEBUG: Extra recomputing of 0 objects took 00:00
12:23:12  DEBUG: Extra recomputing of 0 objects took 00:00
OS: Windows 10 build 19045
Architecture: x86_64
Version: 1.1.0dev.39750 (Git) Conda
Build type: Release
Branch: main
Hash: 7b548bee7f781837640df96831a3e7a7cfa4cf9b
Python 3.11.11, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Light.qss/FreeCAD Light/Fusion

@yorikvanhavre
Copy link
Member

These "Note: API not available due to missing dependencies" messages are from the latest ifcopenshell version... Apparently it has some stuff that depends on Blender (mathutils is a blender module)

But it does not seem to have any effect in FreeCAD, everything still works normally.

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 7, 2025

Closing then as fixed by #18769

@maxwxyz maxwxyz closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
File format: IFC Mod: BIM Related to the BIM/Arch Workbench Status: Needs test on dev version Missing test on the weekly version Type: Bug This issue or PR is related to a bug
Projects
Status: No status
Development

No branches or pull requests

4 participants