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

Error when creating image: can not identify image file #51

Closed
jug-dev opened this issue Feb 16, 2023 · 3 comments
Closed

Error when creating image: can not identify image file #51

jug-dev opened this issue Feb 16, 2023 · 3 comments

Comments

@jug-dev
Copy link
Member

jug-dev commented Feb 16, 2023

TLDR; This is because the files don't exist to download on cloudflare.

The image byte steam fails to decode sometimes because, if you print the image byte steam in these cases, it is not an image, it's a string saying,

b'<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message></Error>'"

The attempt to download the image didn't result in image data it resulted in that XML string, so it can not be decoded. Presumably this XML is from cloudflare saying it can't find the file to download.

Like this URL my worker tried to download: https://a223539ccf6caa2d76459c9727d276e6.r2.cloudflarestorage.com/stable-horde-source-images/8a6d172f-64bf-4925-afef-719484030733_src.webp?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=b30a941498880b9cabb6500261b6f539%2F20230216%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20230216T210517Z&X-Amz-Expires=1800&X-Amz-SignedHeaders=host&X-Amz-Signature=39fa979cb212c4210234e2b94bc2760acb8d312f852b217a5355d894c97d9436

image

@jug-dev
Copy link
Member Author

jug-dev commented Feb 16, 2023

I would try to fix it for you, but I don't have a good fix for downloading a non-existent file :)

@jug-dev
Copy link
Member Author

jug-dev commented Feb 16, 2023

Although the XML response for that url now returns:

<Error>
<Code>ExpiredRequest</Code>
<Message>Request has expired</Message>
</Error>

At the time, it hadn't expired and returned that "key does not exist" xml.

@db0
Copy link
Member

db0 commented Feb 17, 2023

This should be fixed now for source image and mask

@db0 db0 closed this as completed Feb 17, 2023
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

2 participants