Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referenced file not found in .. image:: <path> directive #8959

Closed
mhdirkse opened this issue Mar 4, 2021 · 3 comments
Closed

Referenced file not found in .. image:: <path> directive #8959

mhdirkse opened this issue Mar 4, 2021 · 3 comments
Labels
Milestone

Comments

@mhdirkse
Copy link

mhdirkse commented Mar 4, 2021

Describe the bug
I have a ReadTheDocs project that includes the following text:

#. Browse to http://localhost.
#. Click "Testing":

   .. image:: ../../frankConsoleFindTestTools.jpg

#. Click Ladybug and tab "Test".

When I build my project under Windows with Sphinx 3.5.1, my console shows warnings like:

\downloadUpload\downloadUpload.rst:: WARNING: image file not readable: frankConsoleFindTestTools.jpg

I do not have this issue with Sphinx 3.0.3.

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/ibissource/frank-manual
$ cd frank-manual
$ git checkout dbc5d68f1b3f056512320782b3a875462c6bce7c
$ cd docs
$ make.bat html

Expected behavior
The build finishes without warnings

Your project
https://github.com/ibissource/frank-manual

Screenshots
If applicable, add screenshots to help explain your problem.

Environment info

  • OS: Windows (DOS prompt)
  • Python version: 3.8.2
  • Sphinx version: 3.5.1
  • Sphinx extensions: ??
  • Extra tools: ??

Additional context
Here is the console output I have:

output.txt

@tk0miya
Copy link
Member

tk0miya commented Mar 6, 2021

I hope #8967 will fix this problem. Could you check this please? You can try it with pip install git+https://github.com/tk0miya/sphinx@8959_unix_pathsep_on_windows.

tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 6, 2021
tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 6, 2021
@mhdirkse
Copy link
Author

mhdirkse commented Mar 8, 2021

Dear tk0miya,

Your fix works. I installed the fix with the pip-command you provided. I removed my old "build" directory and did "make.bat html" again. I did not get warnings anymore. I also checked that the file frankConsoleFindTestTools.jpg is rendered again. Thank you very much.

With kind regards,

Martijn Dirkse

@ndunnewind
Copy link

I ran into the same issue with the :download: role. #8967 also seems to work for this problem.

tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 19, 2021
…dows

The first element of env.relfn2path() should be a OS dependent path, not
a posix path.
tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 19, 2021
…dows

The first element of env.relfn2path() should be a OS dependent path, not
a posix path.
tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 19, 2021
…dows

The first element of env.relfn2path() should be a OS dependent path, not
a posix path.
tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 19, 2021
…dows

The first element of env.relfn2path() should be a POSIX path, not a OS
dependent path.
tk0miya added a commit that referenced this issue Mar 20, 2021
Fix #8959: using UNIX path separator confuses Sphinx on Windows
@tk0miya tk0miya closed this as completed Mar 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants