Replies: 3 comments 11 replies
-
the symbol seems to be there, but it can't load (base) shiy@Shis-MacBook-Air pdf_test % nm -gU /Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2_raw/libpdfium.dylib | gre is this because the binary is x86 whereas I'm on arm64? |
Beta Was this translation helpful? Give feedback.
-
no, it is arm64 file /Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2_raw/libpdfium.dylib |
Beta Was this translation helpful? Give feedback.
-
Thanks for the report. How did you install pypdfium2? Through conda, seemingly? which python
python -VV
python -c "import platform as p; print(p.platform())"
conda list --show-channel-urls "pypdfium2|pdfium-binaries"
conda config --show-sources
python -m pip show pypdfium2_raw
python -m pip show pypdfium2_helpers What happens when you comment out the That said, our packages are tested in CI on GH's macOS arm runners, so this is a bit weird. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I ran into the following error on M2 mac:
(base) shiy@Shis-MacBook-Air pdf_test % python3 ./test.py
<CDLL '/Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2_raw/libpdfium.dylib', handle 6a695f30 at 0x11bac6840>
Traceback (most recent call last):
File "/Users/shiy/work/pdf_test/./test.py", line 1, in
from docling.document_converter import DocumentConverter
File "/Users/shiy/miniconda3/lib/python3.12/site-packages/docling/document_converter.py", line 13, in
from docling.backend.docling_parse_v2_backend import DoclingParseV2DocumentBackend
File "/Users/shiy/miniconda3/lib/python3.12/site-packages/docling/backend/docling_parse_v2_backend.py", line 7, in
import pypdfium2 as pdfium
File "/Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2/init.py", line 4, in
import pypdfium2._library_scope
File "/Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2/_library_scope.py", line 6, in
import pypdfium2.raw as pdfium_c
File "/Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2/raw.py", line 5, in
from pypdfium2_raw.bindings import *
File "/Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2_raw/init.py", line 5, in
from pypdfium2_raw.bindings import *
File "/Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2_raw/bindings.py", line 1808, in
FPDFPageObj_GetIsActive = _libs['pdfium']['FPDFPageObj_GetIsActive']
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/shiy/miniconda3/lib/python3.12/ctypes/init.py", line 397, in getitem
func = self._FuncPtr((name_or_ordinal, self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: dlsym(0x6a695f30, FPDFPageObj_GetIsActive): symbol not found
(base) shiy@Shis-MacBook-Air pdf_test % ls /Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2_raw/libpdfium.dylib
/Users/shiy/miniconda3/lib/python3.12/site-packages/pypdfium2_raw/libpdfium.dylib
it seems that in the dylib file, there is no symbol FPDFPageObj_GetIsActive, however as you can see the libpdfium.dylib comes from pypdfium2_raw, not my local filesystem, hence the symbol should exist?
Beta Was this translation helpful? Give feedback.
All reactions