View PDF Fail
Cuongyd196 opened this issue · 1 comments
Hi all. I view pdf fail : Failed to load PDF document.
Log of pdfoid container:
Traceback (most recent call last):
File "/pdfoid/pdfoid/server.py", line 45, in post
result = yield self.backend.render(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 767, in run
value = future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 780, in run
yielded = self.gen.throw(exc)
^^^^^^^^^^^^^^^^^^^
File "/pdfoid/pdfoid/backends/direct.py", line 28, in render
result = yield worker.render(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 767, in run
value = future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 780, in run
yielded = self.gen.throw(exc)
^^^^^^^^^^^^^^^^^^^
File "/pdfoid/pdfoid/backends/direct.py", line 63, in render
yield self.html_to_pdf(
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 767, in run
value = future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 216, in wrapper
result = ctx_run(func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pdfoid/pdfoid/backends/direct.py", line 82, in html_to_pdf
options.binary_location = self.backend.chrome_path
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/selenium/webdriver/chromium/options.py", line 53, in binary_location
raise TypeError(self.BINARY_LOCATION_ERROR)
TypeError: Binary Location Must be a String
Help Me. Thanks
This error looks like you did not set CHROME_PATH
as per https://docs.dmoj.ca/#/site/pdfoid?id=running-pdfoid.