mkdocs-material: Social plugin crashes after updating CairoSVG to 2.8.0
Context
Very recently docs building started to fail on ubuntu workers on both RTD and GHA, even if we use lock files for pinning python dependencies.
This seems to be related to the social plugin based on the stacktrace.
Bug description
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/mkdocs/__main__.py", line 370, in <module>
cli()
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/click/core.py", line 1442, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/mkdocs/__main__.py", line 288, in build_command
build.build(cfg, dirty=not clean)
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/mkdocs/commands/build.py", line 347, in build
config.plugins.on_post_build(config=config)
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/mkdocs/plugins.py", line 602, in on_post_build
return self.run_event('post_build', config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/mkdocs/plugins.py", line 568, in run_event
result = method(**kwargs)
^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 234, in on_post_build
promise.result()
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 241, in _cache_image
image = render_function()
^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 221, in <lambda>
render_function = lambda: self._render_card(site_name, title, description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 256, in _render_card
self._resized_logo_promise.result(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/docs/.asdf/installs/python/3.12.7/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 387, in _load_resized_logo
logo = self._load_logo(config)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 436, in _load_logo
return self._load_logo_svg(path, self.color["text"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/material/plugins/social/plugin.py", line 448, in _load_logo_svg
svg2png(bytestring = data, write_to = file, scale = 10)
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/cairosvg/__init__.py", line 54, in svg2png
return surface.PNGSurface.convert(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/cairosvg/surface.py", line 129, in convert
tree = Tree(
^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/als/envs/1998/lib/python3.12/site-packages/cairosvg/parser.py", line 388, in __init__
if bytestring.startswith(b'\x1f\x8b'):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: startswith first arg must be str or a tuple of str, not bytes
Related links
- https://github.com/ansible/vscode-ansible/actions/runs/14978103711/job/42075436545?pr=1998
- https://app.readthedocs.org/projects/als/builds/28145835/
Reproduction
Steps to reproduce
I was not able to reproduce locally yet, but it happened on both RTD and GHA, starting few hours ago. I suspect another change is causing this, like one of the binary dependencies related to imaging.
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 17 (12 by maintainers)
Commits related to this issue
- chore: disable mkdocs-material social plugin Related: https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to ansible/vscode-ansible by ssbarnea 2 years ago
- chore: disable mkdocs-material social plugin (#2001) Related: https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to ansible/vscode-ansible by ssbarnea 2 years ago
- chore: disable mkdocs-material social plugin (#2001) Related: https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to ansible/vscode-ansible by ssbarnea 2 years ago
- chore: disable mkdocs-material social plugin Related: squidfunk/mkdocs-material#8215 — committed to Qalthos/pytest-ansible by Qalthos 2 years ago
- chore: disable mkdocs-material social plugin (#454) Related: squidfunk/mkdocs-material#8215 — committed to ansible/pytest-ansible by Qalthos 2 years ago
- Pin down cairosvg due to mkdocs-material bug Related: https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to ansible/mkdocs-ansible by ssbarnea 2 years ago
- Pin down cairosvg due to mkdocs-material bug Related: https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to ansible/mkdocs-ansible by ssbarnea 2 years ago
- Pin down cairosvg due to mkdocs-material bug Related: https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to ansible/mkdocs-ansible by ssbarnea 2 years ago
- Pin down cairosvg due to mkdocs-material bug (#211) Related: https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to ansible/mkdocs-ansible by ssbarnea 2 years ago
- chore: renamed test/testScripts to test/e2e (#1998) build(deps): bump the dependencies group across 1 directory with 4 updates (#1999) Bumps the dependencies group with 4 updates in the / directory:... — committed to ansible/vscode-ansible by ssbarnea 2 years ago
- chore: auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci gif --> webp configure the docs removed some lines chore: auto fixes from pre-commit.com hooks for mor... — committed to ansible/vscode-ansible by anushksh 2 years ago
- whole document changes 📜 added gif and updated the documents chore: auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci removed unwanted file reference fixed the... — committed to ansible/vscode-ansible by anushksh 2 years ago
- Apply a patch for https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to gradle/community by oleg-nenashev 2 years ago
- Fix the CairoSVG 2.8.0 compat issue https://github.com/squidfunk/mkdocs-material/issues/8215 — committed to gradle/cookbook by oleg-nenashev 2 years ago
- fix(build): update theme version to fix build because of cairosvg (#1300) Corrige https://github.com/geotribu/website/actions/runs/15026972781/job/42230040791 Spotted upstream https://github.com/squ... — committed to geotribu/website by Guts 2 years ago
- Refresh user documentation and correct grammar (#1976) * whole document changes 📜 added gif and updated the documents chore: auto fixes from pre-commit.com hooks for more information, see https:/... — committed to ansible/vscode-ansible by anushksh 2 years ago
CairoSVG might be causing the issue, as 2.8.0 was released 8 hours ago. Thus, you might consider taking this upstream.
Released as part of 9.6.14.
Amateur mistake 🤦♂️ Should be fixed in e45972a8c.
Fixed in https://github.com/squidfunk/mkdocs-material/commit/bce053afc3a7199e7b10de710ef1506700953061 – tagged you as a co-author, @kamilkrzyskow! Thanks! @ssbarnea can you confirm that this fixes the issue on your CI runs? If it does, we can quickly issue a new release with the fix before other users run into it.
Minimal reproduction: 9.6.13-cairo28.zip
The hunch seems correct, and the fix seems also to be:
Thanks ✌️ Although, if it weren’t for you mentioning a new 2.8.0 release in https://github.com/squidfunk/mkdocs-material/issues/8215#issuecomment-2873779104 I would likely see the commit date 2 years ago and go crazy looking for a more recent change 😆
The error seems pretty straightforward.
The error implies that the bytestring is instead a normal
str. And it is a normalstrcontaining the contents of the svg. https://github.com/squidfunk/mkdocs-material/blob/ca656243deeaf588c6d591a2c24cb57bbe9347d0/material/plugins/social/plugin.py#L441-L448The conditional was introduced in a commit 2 years ago, but only now is added in the 2.8.0 version. Amusing FOSS situation 😄
And the
bytestringis provided by the social pluginsvg2png(bytestring = data, write_to = file, scale = 10)So I believe the social plugin needs to assure casting it to a bytestring withstr.encodeSimply using CairoSVG 2.8.0 and SVG logo should result in the same behaviour, haven’t tried it myself though ✌️
Thanks for reporting. As you can probably imagine, without a reproduction, this is impossible for us to fix. We did not change anything on plugins for the last 2 months, and on the social plugin for 4 months, since we’re in feature freeze. I understand that it’s an ask, but I’d kindly ask you to try to narrow it down.
Until then, there’s nothing actionable for us , so I’m closing this issue as not reproducible.