GithubHelp home page GithubHelp logo

Comments (8)

sideshowbarker avatar sideshowbarker commented on June 24, 2024

So per https://matrixlogs.bakkot.com/WHATWG/2021-06-02#L81

i just found that if i change -F die-on=warning to F die-on=fatal, it seems to work as expected

…you mean that causes the image to get used as expected?

That seems to suggest the WARNING: Couldn't determine width and height of this image: stroked-text.png problem is what causes the failure when die-on=warning is set. And that warning is coming from Bikeshed, so that seems to indicate the image at least got successfully copied to where Bikeshed expects to find it… maybe?

So sounds like some insight from @tabatkins on this might be needed.

from whatwg.org.

miketaylr avatar miketaylr commented on June 24, 2024

…you mean that causes the image to get used as expected?

Actually... no. So that's obviously not a great path forward.

from whatwg.org.

miketaylr avatar miketaylr commented on June 24, 2024

https://tabatkins.github.io/bikeshed/#img-size

Note: Bikeshed will only successfully detect the size of local images, and will not attempt to fetch resources over the network, as there is no way for Bikeshed to know whether the size it would get is stable. Using local images is generally preferred, but if you need to use a remote one, consider setting the width and height manually.

I guess the issue here is the fact that bikeshed doesn't know about these EXTRA_FILES, because they're not actually sent. So it bails.

curlbikeshed() {
# The Accept: header ensures we get the error output even when warnings are produced, per
# https://github.com/whatwg/whatwg.org/issues/227#issuecomment-419969339.
HTTP_STATUS=$(curlretry https://api.csswg.org/bikeshed/ \
--output "$1" \
--write-out "%{http_code}" \
--header "Accept: text/plain, text/html" \
-F die-on=warning \
-F file=@"$INPUT_FILE" \
"${@:2}")
if [[ "$HTTP_STATUS" != "200" ]]; then
cat "$1"
rm -f "$1"
exit 22
fi
}

from whatwg.org.

domenic avatar domenic commented on June 24, 2024

from whatwg.org.

miketaylr avatar miketaylr commented on June 24, 2024

It seems like you could fix this by adding width="" and height="" attributes to the source, maybe?

Yeah -- I was just filing an issue to do that as a workaround for the compat spec.

from whatwg.org.

tabatkins avatar tabatkins commented on June 24, 2024

Yeah, it's good practice to add width/height anyway, so Bikeshed started warning when it couldn't auto-determine them for you.

from whatwg.org.

tabatkins avatar tabatkins commented on June 24, 2024

so that seems to indicate the image at least got successfully copied to where Bikeshed expects to find it… maybe?

Nah, the error message makes it clearer that it's not finding the image at all:

WARNING: Couldn't determine width and height of this image: stroked-text.png
[Errno 2] No such file or directory: '/tmp/stroked-text.png'

from whatwg.org.

annevk avatar annevk commented on June 24, 2024

@plinss @tabatkins shouldn't the API-based Bikeshed not try to open such an image or are we expected to include the images in the payload somehow? (If so, how?)

from whatwg.org.

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.