Closed mocdaniel closed 10 months ago
Hmm interesting. What OS are you using? What output do you get if you run presenterm-export --version
?
I'm on MacOS Sonoma 14.2.1, Apple Silicon. This doesn't look good though:
➜ presenterm-export --version
-----
WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting
-----
Traceback (most recent call last):
File "/opt/homebrew/bin/presenterm-export", line 5, in <module>
from presenterm_export.cli import main
File "/opt/homebrew/lib/python3.11/site-packages/presenterm_export/cli.py", line 13, in <module>
from presenterm_export.pdf import PdfOptions, generate_pdf
File "/opt/homebrew/lib/python3.11/site-packages/presenterm_export/pdf.py", line 2, in <module>
import weasyprint
File "/opt/homebrew/lib/python3.11/site-packages/weasyprint/__init__.py", line 387, in <module>
from .css import preprocess_stylesheet # noqa isort:skip
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/weasyprint/css/__init__.py", line 25, in <module>
from . import computed_values, counters, media_queries
File "/opt/homebrew/lib/python3.11/site-packages/weasyprint/css/computed_values.py", line 11, in <module>
from ..text.ffi import ffi, pango, units_to_double
File "/opt/homebrew/lib/python3.11/site-packages/weasyprint/text/ffi.py", line 431, in <module>
pango = _dlopen(
^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/weasyprint/text/ffi.py", line 417, in _dlopen
return ffi.dlopen(names[0]) # pragma: no cover
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library 'pango-1.0-0': dlopen(pango-1.0-0, 0x0002): tried: 'pango-1.0-0' (no such file), '/System/Volumes/Preboot/Cryptexes/OSpango-1.0-0' (no such file), '/opt/homebrew/lib/pango-1.0-0' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/pango-1.0-0' (no such file), '/usr/lib/pango-1.0-0' (no such file, not in dyld cache), 'pango-1.0-0' (no such file), '/usr/local/lib/pango-1.0-0' (no such file), '/usr/lib/pango-1.0-0' (no such file, not in dyld cache). Additionally, ctypes.util.find_library() did not manage to locate a library called 'pango-1.0-0'
I installed presenterm-export
via pip install
, the way it is mentioned in the docs.
Looks like weasyprint has dependencies outside of what they require via pip. If you install pango and whatever else dependency it complains about, does it work?
After installing pango via homebrew install pango
, I get the following exception when exporting from iTerm2 now - would you like me to open a new issue?
➜ presenterm -e presentation.md
Writing temporary files into /var/folders/5k/zvc1ysc154988bw5xs4y_9w00000gn/T/tmpoijcb_du
Running presentation to capture slide...
Captured 1 slides so far...
Captured 2 slides so far...
Captured 2 slides
Converting slides to HTML...
Replacing images...
Transforming color block #ffbad3 into image /Users/daniel/repositories/private/presentation/dbodky.jpeg
'presenterm-export' execution failed:
Traceback (most recent call last):
File "/opt/homebrew/bin/presenterm-export", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/presenterm_export/cli.py", line 111, in main
run(args, metadata)
File "/opt/homebrew/lib/python3.11/site-packages/presenterm_export/cli.py", line 58, in run
presentation_html = processor.replace_final_images(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/presenterm_export/image.py", line 39, in replace_final_images
Yeah if you could create an issue providing details that'd be great. If you could provide a presentation file that reproduces the issue (including images) that'd help a lot.
Will do. Thx for sorting this one out.
Np, I'll make a note to add some notes on this in the docs.
I just installed
presenterm
,tmux
, andpresenterm-export
and tried to export my presentation viapresenterm -e presentation.md
, however the following error message is being raised:minimum presenterm-export version (0.2.0) not met
.pip list
listspresenterm-export
at0.2.0
,presenterm
is at0.4.0
, installed viacargo install presenterm
.