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

MacOS M1 hrequests-cgo-2.1-darwin-arm64.dylib Error #51

Open
rafaelgdn opened this issue Aug 18, 2024 · 0 comments
Open

MacOS M1 hrequests-cgo-2.1-darwin-arm64.dylib Error #51

rafaelgdn opened this issue Aug 18, 2024 · 0 comments

Comments

@rafaelgdn
Copy link

rafaelgdn commented Aug 18, 2024

Hi Guys, Anyone can help me with this error?

Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in runmodule_as_main
return runcode(code, main_globals, None,
File "/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in runcode
exec(code, run_globals)
File "/Users/chloeliu/substack_scrape/sub-master/src/find_creators/main.py", line 9, in <module>
import hrequests
File "/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/__init__.py", line 30, in <module>
from .response import Response, ProcessResponse
File "/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/response.py", line 13, in <module>
from hrequests.cffi import library
File "/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/cffi.py", line 199, in <module>
library = Library()
File "/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/cffi.py", line 154, in init
self.library: ctypes.CDLL = LibraryManager.load_library()
File "/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/cffi.py", line 133, in load_library
return ctypes.cdll.LoadLibrary(libman.full_path)
File "/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ctypes/__init__.py", line 374, in init
self._handle = *dlopen(self.*name, mode)
OSError: dlopen(/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/bin/hrequests-cgo-2.1-darwin-arm64.dylib, 0x0006): tried: '/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/bin/hrequests-cgo-2.1-darwin-arm64.dylib' (code signature invalid in <85D1022C-0DBB-3939-8022-7B79C0DEE21E> '/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/bin/hrequests-cgo-2.1-darwin-arm64.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x00C1DE70, codeBlobSize=0x00018432), '/System/Volumes/Preboot/Cryptexes/OS/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/bin/hrequests-cgo-2.1-darwin-arm64.dylib' (no such file), '/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/bin/hrequests-cgo-2.1-darwin-arm64.dylib' (code signature invalid in <85D1022C-0DBB-3939-8022-7B79C0DEE21E> '/Users/chloeliu/Library/Caches/pypoetry/virtualenvs/substack-com-J83d1LGf-py3.10/lib/python3.10/site-packages/hrequests/bin/hrequests-cgo-2.1-darwin-arm64.dylib' (errno=85) sliceOffset=0x00000000, codeBlobOffset=0x00C1DE70, codeBlobSize=0x00018432)

What ChatGPT said:
The error you're encountering is related to the Python ctypes library failing to load a dynamic library (.dylib) due to an "invalid code signature" issue. This usually means that the library is not properly signed for macOS security requirements.

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

1 participant