TinyCheck icon indicating copy to clipboard operation
TinyCheck copied to clipboard

not saving PDF report

Open harut420 opened this issue 3 years ago • 11 comments

Hello, is there anything i should enable to save PDF report?

inside the USB key i have under TinyCheck dir only : capture.pcap assets ( dir)

i do not see any pdf here. Thanks

harut420 avatar Aug 18 '21 12:08 harut420

running : sudo python3 /usr/share/tinycheck/analysis/analysis.py /tmp/63FF3B7D/

i get error on libpango :

File "/usr/share/tinycheck/analysis/analysis.py", line 71, in report.generate_report() File "/usr/share/tinycheck/analysis/classes/report.py", line 63, in generate_report htmldoc = HTML(string=content, base_url="").write_pdf() File "/usr/local/lib/python3.7/dist-packages/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/init.py", line 136, in render optimize_size, font_config, counter_style, image_cache) File "/usr/local/lib/python3.7/dist-packages/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/document.py", line 885, in [Page(page_box) for page_box in page_boxes], File "/usr/local/lib/python3.7/dist-packages/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/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/layout/pages.py", line 741, in remake_page page_number, page_state) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/pages.py", line 552, in make_page positioned_boxes, adjoining_margins, discard=False) File "/usr/local/lib/python3.7/dist-packages/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/layout/blocks.py", line 75, in block_level_layout_switch discard) File "/usr/local/lib/python3.7/dist-packages/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/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/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/layout/blocks.py", line 75, in block_level_layout_switch discard) File "/usr/local/lib/python3.7/dist-packages/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/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/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/layout/blocks.py", line 75, in block_level_layout_switch discard) File "/usr/local/lib/python3.7/dist-packages/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/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/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/layout/blocks.py", line 75, in block_level_layout_switch discard) File "/usr/local/lib/python3.7/dist-packages/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/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/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/layout/inlines.py", line 178, in get_next_linebox line_children=[]) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/inlines.py", line 848, in split_inline_box line_placeholders, child_waiting_floats, line_children)) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/inlines.py", line 706, in split_inline_level line_children) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/inlines.py", line 848, in split_inline_box line_placeholders, child_waiting_floats, line_children)) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/inlines.py", line 706, in split_inline_level line_children) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/inlines.py", line 848, in split_inline_box line_placeholders, child_waiting_floats, line_children)) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/inlines.py", line 683, in split_inline_level context, box, max_x - position_x, skip) File "/usr/local/lib/python3.7/dist-packages/weasyprint/layout/inlines.py", line 1104, in split_text_box text, box.style, context, available_width, box.justification_spacing) File "/usr/local/lib/python3.7/dist-packages/weasyprint/text/line_break.py", line 342, in split_first_line text, style, context, original_max_width, justification_spacing) File "/usr/local/lib/python3.7/dist-packages/weasyprint/text/line_break.py", line 278, in create_layout context, style['font_size'], style, justification_spacing, max_width) File "/usr/local/lib/python3.7/dist-packages/weasyprint/text/line_break.py", line 84, in init self.setup(context, font_size, style) File "/usr/local/lib/python3.7/dist-packages/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': /lib/arm-linux-gnueabihf/libpango-1.0.so.0: undefined symbol: pango_context_set_round_glyph_positions

harut420 avatar Aug 19 '21 17:08 harut420

Hi harut420, you need to upgrade with "apt-get upgrade" followed by "pip3 install -U django-weasyprint".

Greetings

aostano avatar Aug 29 '21 08:08 aostano

Hi I'm having the same issue on a completely fresh installed Raspberry pi$4. Everything works in installation, updates, acquisition and analysis, but in the downloded file the pdf is missing. I've tried what @aostano suggested, but it didn't solve the problem.

Thanks for your help

athecat avatar Sep 03 '21 09:09 athecat

Hi , it worked for me. Harut420

harut420 avatar Sep 03 '21 10:09 harut420

Errata corrige: With Raspbian Buster OS 32bit full, not lite you need to be logged in as pi user in console terminal and you need to upgrade with "sudo apt-get upgrade" followed by "sudo pip3 install -U django-weasyprint".

Greetings

aostano avatar Sep 03 '21 12:09 aostano

@aostano I tried to fix the pdf issue with the recommended commands, but it didn't work. There's still no pdf report in the zip file.

I installed tinycheck on raspberry pi 3 and I have to admit that I didn't work with raspberry pi before

jojo018 avatar Nov 10 '21 15:11 jojo018

Same problem for me and

sudo apt-get upgrade

followed by

sudo pip3 install -U django-weasyprint

does not work. The package(s) failed to install initially. I rebooted and tried again and it seems to have installed without errors.

However, still no PDF report.

HonourableTyr avatar Feb 21 '22 21:02 HonourableTyr

In my case the issue was caused by me not installing "Raspbian Buster OS 32bit full" (note the FULL!) Using the right OS, I've managed installing and using TinyCheck with no more issue.

athecat avatar Feb 22 '22 10:02 athecat

In my case the issue was caused by me not installing "Raspbian Buster OS 32bit full" (note the FULL!) Using the right OS, I've managed installing and using TinyCheck with no more issue.

This isn't particularly helpful given that Pi OS Buster (Legacy) is no longer available as a full install (with recommend software). It is only available as "Lite" or "With Desktop". I'm using the January 2022 version of Buster, again the only version available.

Considering that Buster is considered a legacy OS it would be great for TinyCheck to be updated to support Bullseye.

HonourableTyr avatar Feb 22 '22 10:02 HonourableTyr

The weasyprint version can be downgraded by the following command: sudo pip3 install weasyprint==52.5

django-weasyprint complains that dependencies are not met, because weasyprint >= 53.0 are required but reporting works fine afterwards.

greldinard avatar Apr 26 '22 11:04 greldinard

The weasyprint version can be downgraded by the following command: sudo pip3 install weasyprint==52.5

django-weasyprint complains that dependencies are not met, because weasyprint >= 53.0 are required but reporting works fine afterwards.

Awesome, thanks! I've got everything working now. Next step is full testing on seeded devices. Then I can move on to user testing, to make sure that when in self service mode users don't have any difficulties.

HonourableTyr avatar Apr 27 '22 08:04 HonourableTyr

Hello everyone in this thread!

We did a lot of work to improve TinyCheck installation process including dependencies resolution. We believe that this problem is already solved. So please try to reinstall TinyCheck.

Have a good day!

EvgenyAblesov avatar Aug 29 '23 07:08 EvgenyAblesov