Issues with relative path for image directive on Win 10

114 views
Skip to first unread message

Lex Margai

unread,
Mar 19, 2021, 3:05:31 AM3/19/21
to sphinx-users
Hi, everyone

After having installed Sphinx and Python, during a project building, multiple following issues have appeared and images cannot be parsed:
WARNING: image file not readable: assets/images/Server/Tasks/trashIcon.png

In the .rst file, the path for an image is specified as ../../assets/images/Server/Tasks/trashIcon.png 

The path to a file is correct and when I compile this project on other machines (Ubuntu/Windows 10) compilation succeeds and no warnings appear (images are present in html output). 

I found that compilation also succeeds when I specify the path as absolute i.e. /../assets/images/Server/Probe.Page/trashIcon.png 

Sphinx documentation says that relative paths are available for the image directive.
But I cannot define what's wrong with a relative path in my case on this machine? May I wrongly understand the point of relative paths? What's the correct way of specifying path for image directives?  

My environment is:
Python 3.9.2
Sphinx v3.5.2

NB: OFC I may convert all the paths to absolute, but there are lots of images and I should ensure that this is required because I wrongly specify path all this time before.

Thanks in advance!


Kevin Sheppard

unread,
Mar 19, 2021, 5:23:27 AM3/19/21
to sphinx...@googlegroups.com
There is a bug in the latest Sphinx that appears to only affect Windows.


The simple solution for now is to pin sphinx<3.5


--
You received this message because you are subscribed to the Google Groups "sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/e3f214fe-9894-4da6-9839-1fa9d1094793n%40googlegroups.com.

Lex Margai

unread,
Mar 19, 2021, 5:37:02 AM3/19/21
to sphinx-users
Hi Kevin, that's very helpful knowledge. Thank you!

пятница, 19 марта 2021 г. в 16:23:27 UTC+7, kevin.k....@gmail.com:

Komiya Takeshi

unread,
Mar 20, 2021, 10:11:15 AM3/20/21
to sphinx...@googlegroups.com
Hi,

Sorry for inconvenience. I just bumped Sphinx-3.5.3 to fix the bug.
Could you try the new one?
Please let me know if it does not work.

Thanks,
Takeshi KOMIYA

2021年3月19日(金) 16:05 Lex Margai <padi...@gmail.com>:

Lex Margai

unread,
Mar 24, 2021, 12:43:03 AM3/24/21
to sphinx-users
Hi,

Sorry for late reply, I just updated my Sphinx to 3.5.3 and it works well.

Thank you

суббота, 20 марта 2021 г. в 21:11:15 UTC+7, i.tk...@gmail.com:
Reply all
Reply to author
Forward
0 new messages