g-provost / lightgallery-markdown

Markdown extension to wrap images in a lightbox.
MIT License
26 stars 5 forks source link

DeprecationWarning: 'etree' is deprecated. Use 'xml.etree.ElementTree' instead. #15

Open TRaSH- opened 1 year ago

TRaSH- commented 1 year ago

Getting the following error related to this plugin

INFO     -  DeprecationWarning: Using the add method to register a processor or pattern is deprecated. Use the
            `register` method instead.
              File "c:\python38\lib\site-packages\lightgallery.py", line 57, in extendMarkdown
                md.treeprocessors.add("lightbox", ImagesTreeprocessor(config, md), "_end")
              File "c:\python38\lib\site-packages\markdown\util.py", line 462, in add
                warnings.warn(
INFO     -  DeprecationWarning: The 'md_globals' parameter of 'lightgallery.LightGalleryExtension.extendMarkdown' is
            deprecated.
              File "c:\python38\lib\site-packages\markdown\core.py", line 125, in registerExtensions
                ext._extendMarkdown(self)
              File "c:\python38\lib\site-packages\markdown\extensions\__init__.py", line 82, in _extendMarkdown
                warnings.warn(
Stanzilla commented 1 year ago

I recommend switching to https://github.com/blueswen/mkdocs-glightbox instead

do-me commented 1 year ago

@Stanzilla 
thanks for the hint, quick and painless.

  1. pip install mkdocs-glightbox
  2.   - glightbox under plugins in mkdocs.yml
  3. lighthouse can be removed under markdown_extensions