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

Exit with code 1 due to network error: ProtocolUnknownError #21

Open
fauust opened this issue Dec 13, 2023 · 0 comments
Open

Exit with code 1 due to network error: ProtocolUnknownError #21

fauust opened this issue Dec 13, 2023 · 0 comments

Comments

@fauust
Copy link
Collaborator

fauust commented Dec 13, 2023

Investigate why we have very frequently the following error, PDF generation with python3 main.py --quiet.

[INFO] 08:10:03 Generating en(2716)
[INFO] 08:11:16 Merging HTML
[INFO] 08:15:07 Starting wk
Traceback (most recent call last):
  File "/srv/kb/mariadb-documentation/mariadb_pdf/main.py", line 22, in <module>
    main()
  File "/srv/kb/mariadb-documentation/mariadb_pdf/main.py", line 16, in main
    generate_full_pdf(lang_csv, Path(f"output_{lang}"), config)
  File "/srv/kb/mariadb-documentation/mariadb_pdf/pdf/generate_pdf.py", line 17, in generate_full_pdf
    generate_sub_pdf(kburls, dir_path, config, outline)
  File "/srv/kb/mariadb-documentation/mariadb_pdf/pdf/generate_pdf.py", line 33, in generate_sub_pdf
    wkhtmltopdf(f"{dir_path}/{config.html_path}", dir_path / config.pdf_path, config)
  File "/srv/kb/mariadb-documentation/mariadb_pdf/pdf/generate_pdf.py", line 59, in wkhtmltopdf
    pdfkit.from_file(
  File "/srv/kb/mariadb-documentation/mariadb_pdf/.venv/lib/python3.11/site-packages/pdfkit/api.py", line 51, in from_file
    return r.to_pdf(output_path)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/srv/kb/mariadb-documentation/mariadb_pdf/.venv/lib/python3.11/site-packages/pdfkit/pdfkit.py", line 201, in to_pdf
    self.handle_error(exit_code, stderr)
  File "/srv/kb/mariadb-documentation/mariadb_pdf/.venv/lib/python3.11/site-packages/pdfkit/pdfkit.py", line 155, in handle_error
    raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: ProtocolUnknownError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant