Phoenix124 / scribd-downloader

318 stars 104 forks source link

Failed pdf conversion #34

Closed TnT420 closed 1 year ago

TnT420 commented 3 years ago

Following Error:-

Completed downloading book!

Converting to Motor_xyz.pdf.. Traceback (most recent call last): File "/usr/local/bin/scribdl", line 33, in sys.exit(load_entry_point('scribd-downloader==1.3.1', 'console_scripts', 'scribdl')()) File "/usr/local/lib/python3.7/dist-packages/scribd_downloader-1.3.1-py3.7.egg/scribdl/command_line.py", line 57, in _command_line File "/usr/local/lib/python3.7/dist-packages/scribd_downloader-1.3.1-py3.7.egg/scribdl/pdf_converter.py", line 31, in to_pdf File "/usr/local/lib/python3.7/dist-packages/scribd_downloader-1.3.1-py3.7.egg/scribdl/pdf_converter.py", line 39, in _markdown_to_pdf File "/usr/local/lib/python3.7/dist-packages/md2pdf-0.5-py3.7.egg/md2pdf/core.py", line 49, in md2pdf html.write_pdf(pdf_file_path, stylesheets=css) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/init.py", line 183, in write_pdf counter_style=counter_style, image_cache=image_cache) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/init.py", line 136, in render optimize_size, font_config, counter_style, image_cache) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/document.py", line 885, in _render [Page(page_box) for page_box in page_boxes], File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/document.py", line 885, in [Page(page_box) for page_box in page_boxes], File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/init.py", line 124, in layout_document pages = list(make_all_pages(context, root_box, html, pages)) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/pages.py", line 802, in make_all_pages page, resume_at = remake_page(i, context, root_box, html) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/pages.py", line 741, in remake_page page_number, page_state) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/pages.py", line 552, in make_page positioned_boxes, adjoining_margins, discard=False) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 60, in block_level_layout page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 75, in block_level_layout_switch discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 128, in block_box_layout absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 520, in block_container_layout absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 60, in block_level_layout page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 75, in block_level_layout_switch discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 128, in block_box_layout absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 520, in block_container_layout absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 60, in block_level_layout page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 75, in block_level_layout_switch discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 128, in block_box_layout absolute_boxes, fixed_boxes, adjoining_margins, discard) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/blocks.py", line 379, in block_container_layout for i, (line, resume_at) in enumerate(lines_iterator): File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/inlines.py", line 50, in iter_line_boxes absolute_boxes, fixed_boxes, first_letter_style) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/inlines.py", line 178, in get_next_linebox line_children=[]) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/layout/inlines.py", line 1059, in split_inline_box line_height, new_box.baseline = strut_layout(box.style, context) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/css/computed_values.py", line 730, in strut_layout layout = Layout(context, style['font_size'], style) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/text/line_break.py", line 84, in init self.setup(context, font_size, style) File "/usr/local/lib/python3.7/dist-packages/weasyprint-53.0-py3.7.egg/weasyprint/text/line_break.py", line 100, in setup pango.pango_context_set_round_glyph_positions(pango_context, False) File "/usr/local/lib/python3.7/dist-packages/cffi/api.py", line 912, in getattr make_accessor(name) File "/usr/local/lib/python3.7/dist-packages/cffi/api.py", line 908, in make_accessor accessorsname File "/usr/local/lib/python3.7/dist-packages/cffi/api.py", line 838, in accessor_function value = backendlib.load_function(BType, name) AttributeError: function/symbol 'pango_context_set_round_glyph_positions' not found in library 'libpango-1.0.so.0': /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: pango_context_set_round_glyph_positions

Phoenix124 commented 1 year ago

@TnT420 try latest python I saw that is issue of weasyprint WeasyPrint/issues With python > 3.11 worked for me