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
Optimize plugin fails with "No such file or directory" in .cache directory #5676
Comments
Thanks for reporting! Unfortunately, I'm not able to see the error you reported (multiple runs, same result):
My gut tells me it might be a race condition. Does the error occur when you set plugins:
- optimize:
concurrency: 1 |
Additionally, please check if #5098 (comment) fixes it. |
Okay, so |
@squidfunk setting If it is a race condition, my machine hits it consistently. I also tried https://github.com/squidfunk/mkdocs-material-insiders/commit/647614b2710e544009555fa3a7c358aa712bf5c4 and using |
Just to share: this allowed the pipeline to succeed, but many images missing. |
Hmm, I'm a little bit lost here, as I'm not able to observe the issue. I also tried to run it under the exact same Python version as reported in the OP + I'm also on macOS, but no success – everything works as expected 😐 If somebody that can observe the issue can assist, I'd be more than happy to collaborate in a PR on the Insiders repository. |
Wait, I think I know what might be happening: do you have
Are all of those images PNGs? |
I've improved the resilience of the
I'm pretty convinced this should fix the reported errors, and/or point the author into the right direction, i.e., if |
I didn't install your latest, but I did add pngquant via brew to the pipeline and successfully built. The images I dynamically populate with a main.py macro on landing pages aren't showing up, but that could be another issue? At any rate, this ticket is about the gitlab pipeline failing and it no longer fails once I added brew and installed pngquant that way. |
Thanks for testing! Perfect, sounds like we found the issue! The latest commit only improves error reporting and checks if |
@squidfunk I don't believe I had I can also verify that running |
Perfect, thanks for testing! We use |
Oops. Forgot to remove "print_gain_summary: false" when I did, it failed on a later image:
|
@JuLeeAtPlanet and you installed |
@JuLeeAtPlanet could you install the latest version of Insiders and try again? If it still happens, I'll look into it asap. |
Can do this in 2 hours. Can I upgrade? |
@JuLeeAtPlanet just go through the installation steps, pip should pull the latest changes then:
If that doesn't work, try:
|
Released as part of 9.1.18+insiders-4.37.0 – I'm sufficiently confident that this should fix all reported problems, i.e., instruct the user to install |
Still not getting to a successful job. One of the reasons: when I
Will continue to work on this over the weekend... |
Please see #4074. |
Apologies for tossing this on an existing closed issue, I'm happy to open another issue if it would be more appropriate. I was also experiencing this issue on site build with insiders |
@squidfunk Can confirm this looks fixed for me. Added a |
Context
I recently tried adding the
optimize
plugin to work with a variety of PNGs I use on https://distant.dev/. It appears that I am hitting the issue described in #5098, so taking a stab at reporting it.I'm using commit
fa5bd3f45024328d973977db80cccd5b1df89228
of Insiders.Bug description
Running
mkdocs build
ormkdocs serve
with theoptimize
plugin configured withinmkdocs.yml
results in aFileNotFoundError
.Related links
Reproduction
example.zip
I've removed everything but a blank
index.md
page as it appears unrelated to which images are actual referenced. Additionally, I cleared out the majority of images and other assets alongside all css and javascript.mkdocs.yml
Steps to reproduce
mkdocs build
ormkdocs serve
.cache
directory.cache/plugin/optimize/assets/images/architecture
without anything inside, nor anything else in the parent directories.Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: