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

Weasyprint PyPDF issue breaks quarto render on Netlify deploy #30

Open
cynthiahqy opened this issue Jul 23, 2024 · 4 comments
Open

Weasyprint PyPDF issue breaks quarto render on Netlify deploy #30

cynthiahqy opened this issue Jul 23, 2024 · 4 comments

Comments

@cynthiahqy
Copy link
Owner

Netlify build started failing at CV.qmd:

Traceback (most recent call last):
File "/opt/buildhome/python3.8/bin/weasyprint", line 8, in <module>
sys.exit(main())
File "/opt/buildhome/python3.8/lib/python3.8/site-packages/weasyprint/main.py", line 207, in main
html.write_pdf(output, **options)
File "/opt/buildhome/python3.8/lib/python3.8/site-packages/weasyprint/init.py", line 252, in write_pdf
self.render(font_config, counter_style, **options)
File "/opt/buildhome/python3.8/lib/python3.8/site-packages/weasyprint/document.py", line 399, in write_pdf
pdf = generate_pdf(self, target, zoom, **options)
File "/opt/buildhome/python3.8/lib/python3.8/site-packages/weasyprint/pdf/init.py", line 120, in generate_pdf
pdf = pydyf.PDF((version or '1.7'), identifier)
TypeError: init() takes 1 positional argument but 3 were given
Error producing PDF.

Most likely because of PyPDF dependency issue in weasyprint: Kozea/WeasyPrint#2200

@cynthiahqy
Copy link
Owner Author

ugh. tried to update weasyprint requirement to latest (62.3), but that requires python 3.9+ and netlify only has 3.8 available: https://docs.netlify.com/configure-builds/available-software-at-build-time/

@cynthiahqy
Copy link
Owner Author

Might need to stick to manual updates using quarto publish netlify

@cynthiahqy
Copy link
Owner Author

Or maybe use typst instead: https://github.com/skyzh/chicv

cynthiahqy added a commit that referenced this issue Oct 4, 2024
- removes PDF format from CV to avoid weasyprint error
@cynthiahqy
Copy link
Owner Author

Ended up with an initialization stage error, because at some point I set the environment variable PYTHON_VERSION to 3.9, even though only 3.8 is available. I deleted this and the deploy previews worked again (after removing weasyprint): https://docs.netlify.com/environment-variables/get-started/#modify-and-delete-environment-variables

12:06:27 PM: Starting to install dependencies
12:06:28 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
12:06:28 PM: /opt/build-bin/run-build-functions.sh: line 384: /opt/buildhome/python3.9/bin/activate: No such file or directory
12:06:28 PM: Error setting python version from the PYTHON_VERSION environment variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant