Code Monkey home page Code Monkey logo

Comments (5)

mgeisler avatar mgeisler commented on June 12, 2024

Hi @max-heller, before I start looking more into this, do you recognize this error off the top of your head? 🙂

Cc @henrif75 and @djmitche who looked at other PDF errors in #1911.

from comprehensive-rust.

max-heller avatar max-heller commented on June 12, 2024

Hi @max-heller, before I start looking more into this, do you recognize this error off the top of your head? 🙂

These have to do with Pandoc attempting to embed remote images in the PDF.

[2024-04-03T17:00:25Z WARN  mdbook_pandoc::preprocess] Unable to normalize link 'https://img.shields.io/github/actions/workflow/status/google/comprehensive-rust/build.yml?style=flat-square' in chapter 'Comprehensive Rust 🦀 এ আপনাকে স্বাগতম': Unable to load remote image 'https://img.shields.io/github/actions/workflow/status/google/comprehensive-rust/build.yml?style=flat-square': https://img.shields.io/github/actions/workflow/status/google/comprehensive-rust/build.yml?style=flat-square: status code 522
Warning:  Could not convert image /tmp/tex2pdf.-e893803b8b925751/9b1e09f6511f387768da72145790446bd7e7cf63.yml: Cannot load file

This error relates to this workaround mdbook-pandoc implements for shields.io badges. The 522 status code suggests a spurious error downloading the image.

Warning:  Could not convert image /tmp/tex2pdf.-b8d581420691af04/9b1e09f6511f387768da72145790446bd7e7cf63.vs: Cannot load file

I'm not sure about this one and can't reproduce it locally. I don't see any images with .vs extensions in the source. Let's try running with verbosity = "INFO" as shown in #1911 (comment)

from comprehensive-rust.

mgeisler avatar mgeisler commented on June 12, 2024

Thanks @max-heller for the explanation!

Your analysis seems spot on: the error went away on the third run of the build.

It would be nice if we could make our build resilient to this somehow... Perhaps I should just remove the shields.io images from the source when generating the book. I don't think they fit very well into a PDF 🙂

from comprehensive-rust.

max-heller avatar max-heller commented on June 12, 2024

It would be nice if we could make our build resilient to this somehow

Agreed, although I'm not sure of a good general solution. Maybe mdbook-pandoc could strip out images it can't load and emit a loud warning?

from comprehensive-rust.

mgeisler avatar mgeisler commented on June 12, 2024

Maybe mdbook-pandoc could strip out images it can't load and emit a loud warning?

Yeah, for this particular case that would work well. But it seems like the wrong place to add this kind of logic — I feel it should be the caller of mdbook-pandoc that implements the retry logic.

I think we can close this issue for now: it's a transient error and now we know that it should go away after a while. If it pops up again, then we can take another loop at implementing some kind of retries (or more likely: strip out the unreliable images).

from comprehensive-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.