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

import ifcopenshell failed with error "signed with custom identity or adhoc?" on the macOS M1 #58

Open
hiroyuki-sato opened this issue Nov 28, 2023 · 1 comment

Comments

@hiroyuki-sato
Copy link

Hello, team.

Does anyone know how to fix the error "signed with custom identity or ad-hoc?"
When I execute import ifcopenshell in the FreeCAD App, I got the following errors.

Best regards.

>>> import ifcopenshell
Traceback (most recent call last):
  File "/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/__init__.py", line 61, in <module>
    from . import ifcopenshell_wrapper
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
  File "/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/ifcopenshell_wrapper.py", line 13, in <module>
    from . import _ifcopenshell_wrapper
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
ImportError: dlopen(/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/_ifcopenshell_wrapper.so, 0x0002): tried: '/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/_ifcopenshell_wrapper.so' (code signature in <82625F66-0FB6-3B7B-9D0D-5D0C432ABD9D> '/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/_ifcopenshell_wrapper.so' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/_ifcopenshell_wrapper.so' (no such file), '/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/_ifcopenshell_wrapper.so' (code signature in <82625F66-0FB6-3B7B-9D0D-5D0C432ABD9D> '/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/_ifcopenshell_wrapper.so' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Applications/FreeCAD.app/Contents/Resources/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
  File "/Users/user/Library/Application Support/FreeCAD/AdditionalPythonPackages/py310/ifcopenshell/__init__.py", line 69, in <module>
    raise ImportError("IfcOpenShell not built for '%s'" % python_distribution)
ImportError: IfcOpenShell not built for 'darwin/64bit/python3.10'

In ipython

I succeed in loading iopenshell in the python 3.10.

ipython
Python 3.10.11 (main, May 17 2023, 13:56:28) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.15.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import sys

In [2]: sys.path.append("/Users/user/Library/Application Support/FreeCAD/Additi
   ...: onalPythonPackages/py310/")

In [3]: import ifcopenshell
No stream support: No module named 'lark'

In [4]: ifcopenshell.version
Out[4]: 'v0.7.0-6c9e130ca'

Environment

  • macOS: 13.6.1 (M1 mac)
  • FreeCAD: 0.21.1 33694
  • ifcopehshell: v0.7.0-6c9e130ca
  • NativeIFC: Fllow this instruction
@yorikvanhavre
Copy link
Owner

yorikvanhavre commented Dec 1, 2023

This looks like a macos-specific error... Googling for "mapped file has no Team ID and is not a platform binary" returns some results, but it's not clear to me what the problem is... Any idea @chennes ? Could it be that our signed FreeCAD now prevents importing unsigned python modules?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants