question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PixBuf not recognizing image format

See original GitHub issue

Hello,

I just installed weasyprint and some dependencies , I’m struggling to get it to work properly, I am getting this for a moment now :

ERROR: Failed to load image at "http://indivisible.test/projets/1" (Pixbuf error: Format d’image non reconnu)
Traceback (most recent call last):
  File "/usr/local/bin/weasyprint", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/weasyprint/__main__.py", line 214, in main
    getattr(html, 'write_' + format_)(output, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/weasyprint/__init__.py", line 222, in write_pdf
    self.render(
  File "/usr/local/lib/python3.9/site-packages/weasyprint/document.py", line 698, in write_pdf
    int(round(y * scale)))
ValueError: cannot convert float NaN to integer

I’m working on MacOS 10.14.6 with Python 3.8 , everything has been installed with HomeBrew

Any tought on this ? Thanks a lot !!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
liZecommented, Jun 9, 2021

(Reopening, because there’s a crash that we have to fix, even when the image doesn’t work.)

1reaction
vwasteelscommented, Jun 9, 2021

Thanks for this hint, I just found the image causing this and removed it ! thanks !!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ninja: "Couldn't recognize image format..." - GitLab - GNOME
I get the following error when running ninja in the build folder: [3/10] Generating resources.h with a custom command.failed to load ...
Read more >
GdkPixbuf returns "gi._glib.GError: Couldn't recognize the ...
Looks like everything is in place. Pixbuf.get_formats returns a full list of image formats containing [png]. gdk-pixbuf-query-loaders has an ...
Read more >
Pixbuf error: Unrecognized image file format #182 - GitHub
Hi I am running WeasyPrint 0.21 on Ubuntu (12.04) and installed all the dependencies according to ...
Read more >
graphics/gdk-pixbuf2: Fails to build with PNG option disabled
... recognize the image file format for file '/wrkdirs/usr/ports/graphics/gdk-pixbuf2/work/gdk-pixbuf-2.36.12/tests/icc-profile.png' It's ...
Read more >
[Solved] Could not load pixbuf from icon theme. gdk error ...
... to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) Bail out!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found