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: Creating project fails on MacOS (No module named 'typing_extensions') #19051

Open
2 tasks done
risacher opened this issue Jan 13, 2025 · 4 comments
Open
2 tasks done
Labels
Dependencies Pull requests that update a dependency file Mod: BIM Related to the BIM/Arch Workbench Packaging/building Related to building, compiling or packaging FreeCAD Status: Confirmed The issue was confirmed by others Type: Bug This issue or PR is related to a bug

Comments

@risacher
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Using weekly build from 2025-01-10 on MacOS, if I try to create a new Project from the BIM workbench's 3D/BIM menu, it fails with the below error. I also tried this with a recent Linux build (on Ubuntu 24.04) and did not have the same problem. This is maybe related to #18300, but that issue doesn't seem to have the same property of being MacOS-specific, and I can trigger it without opening an existing file.

14:33:28  Running the Python command 'BIM_Project' failed:
Traceback (most recent call last):
  File "/Applications/FreeCAD.app/Contents/Resources/Mod/BIM/bimcommands/BimProject.py", line 49, in Activated
    from nativeifc import ifc_tools
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/FreeCAD.app/Contents/Resources/Mod/BIM/nativeifc/ifc_tools.py", line 34, in <module>
    from ifcopenshell import geom
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/ifcopenshell/geom/__init__.py", line 55, in <module>
    from . import occ_utils as utils
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/ifcopenshell/geom/occ_utils.py", line 27, in <module>
    from typing_extensions import assert_never
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

No module named 'typing_extensions'

I also note that typing_extensions looks like it is included, but I guess isn't being found for some reason:

~$ find /Applications/FreeCAD.app -name 'typing_extensions*' -print
/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/pip/_vendor/typing_extensions.py
/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/setuptools/_vendor/typing_extensions-4.12.2.dist-info
/Applications/FreeCAD.app/Contents/Resources/lib/python3.11/site-packages/setuptools/_vendor/typing_extensions.py

Full version info

OS: macOS 12.7.6
Architecture: x86_64
Version: 1.1.0dev.39804 (Git) Conda
Build type: Release
Branch: main
Hash: 73f0e165bee7837704d374d0b1da430027e99fdb
Python 3.11.11, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: C/Default (C)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion
Installed mods: 
  * parts_library
  * Curves 0.6.53

Subproject(s) affected?

BIM

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@risacher risacher added Status: Needs confirmation Missing confirmation from other testers Status: Needs triage Missing triage labels Jan 13, 2025
@yorikvanhavre
Copy link
Member

Duplicate of #18011

@yorikvanhavre yorikvanhavre marked this as a duplicate of #18011 Jan 14, 2025
@yorikvanhavre
Copy link
Member

yorikvanhavre commented Jan 14, 2025

#18011 has been closed for another reason, but this problem is still there: Newer versions of ifcopenshell require python3-typing-extensions

@adrianinsaval is it doable to include that module in our builds?

Edit I see above that it is, already... Strange??

Maybe IfcOpenShell can't find it at that path?

@luzpaz luzpaz added Type: Bug This issue or PR is related to a bug Mod: BIM Related to the BIM/Arch Workbench Packaging/building Related to building, compiling or packaging FreeCAD Dependencies Pull requests that update a dependency file Status: Confirmed The issue was confirmed by others and removed Status: Needs confirmation Missing confirmation from other testers Status: Needs triage Missing triage labels Jan 14, 2025
@luzpaz luzpaz changed the title Creating BIM project fails on MacOS (No module named 'typing_etensions') BIM: Creating project fails on MacOS (No module named typing_extensions) Jan 14, 2025
@luzpaz luzpaz changed the title BIM: Creating project fails on MacOS (No module named typing_extensions) BIM: Creating project fails on MacOS (No module named 'typing_extensions') Jan 14, 2025
@luzpaz
Copy link
Contributor

luzpaz commented Jan 14, 2025

OP mentioned #18300, is there a relationship ?

@yorikvanhavre
Copy link
Member

OP mentioned #18300, is there a relationship ?

I don't think so...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file Mod: BIM Related to the BIM/Arch Workbench Packaging/building Related to building, compiling or packaging FreeCAD Status: Confirmed The issue was confirmed by others Type: Bug This issue or PR is related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants