napari / docs

Documentation for napari (other than API docs)
BSD 3-Clause "New" or "Revised" License
9 stars 37 forks source link

BUG `lxml[html_clean]` should be in requirements #396

Closed lucyleeow closed 2 months ago

lucyleeow commented 2 months ago

Currently doc builds are failing due to (e.g., see #390):

  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/napari/utils/notebook_display.py", line 9, in <module>
    from lxml.html.clean import Cleaner
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/lxml/html/clean.py", line 18, in <module>
    raise ImportError(
ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Install lxml[html_clean] or lxml_html_clean directly.

Note that from lxml.html.clean import Cleaner is inside a try/except BUT this lxml project separation causes a ImportError whereas the except is for ModuleNotFoundError.

Also lxml is needed for testing AND docs - without it we won't have alt-text? Should we add a napari[docs] requirements to our pyproject.toml? What should be included in 'all'?

(Note: edited)

lucyleeow commented 2 months ago

closed by #397