DMOJ / online-judge

A modern open-source online judge and contest platform system.
https://dmoj.ca
GNU Affero General Public License v3.0
951 stars 364 forks source link

View PDF Fail #2286

Closed Cuongyd196 closed 1 year ago

Cuongyd196 commented 1 year ago

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

Xyene commented 1 year ago

This error looks like you did not set CHROME_PATH as per https://docs.dmoj.ca/#/site/pdfoid?id=running-pdfoid.