Skip to content

Sphinx warns about not readable image file (although the image is found for html build) #120

@emmanuelle

Description

@emmanuelle

I'm currently trying to port the doc of scikit-image to sphinx-gallery (see scikit-image/scikit-image#2078).

During the html build of the doc, sphinx issues the following warning (treated as error by CI):

 /home/emma/travail/projects/scikit-image/doc/source/user_guide/numpy_images.rst:None: 
WARNING: image file not readable: user_guide/../../_images/sphx_glr_plot_camera_numpy_001.png

sphx_glr_plot_camera_numpy_001.png is generated by one of the examples of the gallery, and included in numpy_images.rst as

.. image:: ../../_images/sphx_glr_plot_camera_numpy_001.png
    :width: 45%
    :target: ../auto_examples/numpy_operations/plot_camera_numpy.html

From the warning, it seems that the path is wrong, but the html page generated from the build displays correctly the image (and the link to the gallery example works too). Therefore, I don't understand the origin of the warning (and maybe I wouldn't mind it so much if didn't make our Travis CI fail :-)).

This path issue might be another facet of the problem of having a separated source directory, as also illustrated in #115, but I'm not sure whether that point matters here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions