Skip to content

OSError: wkhtmltopdf exited with non-zero code -13 #209

@alchermd

Description

@alchermd

Good day! I can't find a documentation anywhere on the -13 error code. I'm getting the following error:

Internal Server Error: /dashboard/checklists/63628/
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/src/web/authentication/decorators.py", line 84, in wrapper
    return f(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/usr/src/web/checklists/views.py", line 358, in checklist_detail
    pdf = generate_checklist_pdf(checklist)
  File "/usr/src/web/checklists/helpers.py", line 35, in generate_checklist_pdf
    pdf = pdfkit.from_string(html, False, options=options)
  File "/usr/local/lib/python3.8/site-packages/pdfkit/api.py", line 72, in from_string
    return r.to_pdf(output_path)
  File "/usr/local/lib/python3.8/site-packages/pdfkit/pdfkit.py", line 159, in to_pdf
    raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, stderr))
OSError: wkhtmltopdf exited with non-zero code -13. error:
Loading pages (1/6)
[======>                                                     ] 10%
"GET /dashboard/checklists/63628/?format=pdf HTTP/1.1" 500 107761

If it matters, I'm running it on a docker container with an M1 Mac as the host machine. Please let me know if I need to add more information. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions