-
Notifications
You must be signed in to change notification settings - Fork 331
Closed
Description
I am having a problem using python-pdfkit and wkhtmltopdf with Ubuntu 16.04 LTS server.
Installed python-pdfkit with pip and wkhtmltopdf from this bash script https://github.com/JazzCore/python-pdfkit/blob/master/travis/before-script.sh
Locally on mac setup I did it with brew and I get pdfs printed, but on Linux server, I am getting an error:
[2020-11-26 09:18:10,698] urllib3.connectionpool WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:847)'),)': /api/1895361/store/ (connectionpool 14509 140240592238336)
[2020-11-26 09:23:57,209] django.request ERROR Internal Server Error: /pdf-doc (log 14986 140683311347584)
Traceback (most recent call last):
File "/home/uptree/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/uptree/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/uptree/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 73, in view
return self.dispatch(request, *args, **kwargs)
File "/home/uptree/src/uptree/apps/common/mixins.py", line 30, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/home/uptree/src/uptree/apps/common/mixins.py", line 43, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/home/uptree/venv/lib/python3.6/site-packages/django/views/generic/base.py", line 101, in dispatch
return handler(request, *args, **kwargs)
File "/home/uptree/src/uptree/apps/courses/views.py", line 153, in get
content = pdfkit.from_string(html, False, options)
File "/home/uptree/venv/lib/python3.6/site-packages/pdfkit/api.py", line 72, in from_string
return r.to_pdf(output_path)
File "/home/uptree/venv/lib/python3.6/site-packages/pdfkit/pdfkit.py", line 156, in to_pdf
raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Error: Authentication Required
Error: Authentication Required
Can someone help me solve this, any suggestions?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels