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

v1.13.1 breaks mkdocs serve (v1.12.2 works) #299

Closed
niccokunzmann opened this issue Jun 23, 2024 · 2 comments · Fixed by #311
Closed

v1.13.1 breaks mkdocs serve (v1.12.2 works) #299

niccokunzmann opened this issue Jun 23, 2024 · 2 comments · Fixed by #311
Assignees
Labels
bug Something isn't working

Comments

@niccokunzmann
Copy link

niccokunzmann commented Jun 23, 2024

When I run serve the build, I see this error:

mkdocs serve
...
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from front matter: host/self.md
DEBUG   -  Reading: news/2024-04-10-website.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/en/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/de/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/es/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/nb_NO/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/it/news/2024-04-10-website/index.md
DEBUG   -  Running 5 `page_markdown` events
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_mdpo_q7uxxce3/th/news/2024-04-10-website/index.md
DEBUG   -  Running 3 `page_content` events
DEBUG   -  meta-descriptions: Adding meta description from first paragraph: news/2024-04-10-website.md
DEBUG   -  [RSS-plugin]: Extracting dates for news/2024-04-10-website.md
DEBUG   -  [RSS-plugin]: Not found: /home/nicco/open-web-calendar/.cache/plugin/social/5cf12f946dfbb3df6df3c1a5d9bfc9d8.png
DEBUG   -  [RSS-plugin]: Not found:
           /home/nicco/open-web-calendar/.tox/docs/tmp/mkdocs_gjiuwg1m/home/nicco/open-web-calendar/assets/images/social/news/2024-04-10-website.png
DEBUG   -  [RSS-plugin]: Social card still not exists locally. Trying to retrieve length from remote image:
           http://127.0.0.1:8000/assets/images/social/news/2024-04-10-website.png. Note that would work only if the social card image has been
           already published before the build.
ERROR   -  Error reading page 'news/2024-04-10-website.md': HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url:
           /assets/images/social/news/2024-04-10-website.png (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at
           0x7a57c360bed0>: Failed to establish a new connection: [Errno 111] Connection refused'))
DEBUG   -  Running 1 `build_error` events

ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /assets/images/social/news/2024-04-10-website.png (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7a57c360bed0>: Failed to establish a new connection: [Errno 111] Connection refused'))
docs: exit 1 (3.74 seconds) /home/nicco/open-web-calendar> mkdocs -v serve pid=1274320
  docs: FAIL code 1 (43.62=setup[39.88]+cmd[3.74] seconds)
  evaluation failed :( (43.69 seconds)

The build with version 1.12.2 works fine.

Repo: https://github.com/niccokunzmann/open-web-calendar/

mkdocs build works.

See also:

@Guts
Copy link
Owner

Guts commented Jun 26, 2024

Hello @niccokunzmann

Thanks for your interest and taking time to report.
Indeed, fetching remote images length was quite "fragile". I've made some improvements:

  • caching remote requests between builds
  • do not crash anymore on ConnectionError
  • disable remote fetching on serve command since it did not make sense

The 2 latest points are directly related to your issue. I hope it does the job :)!

Everything is released in https://github.com/Guts/mkdocs-rss-plugin/releases/tag/1.14.0.
Please try again and give me feedback here.

@niccokunzmann
Copy link
Author

Thanks for the fast response! Yes, indeed it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants