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

Sphinx fails to create warning log file if directory does not exist #9913

Open
arwedus opened this issue Nov 30, 2021 · 0 comments
Open

Sphinx fails to create warning log file if directory does not exist #9913

arwedus opened this issue Nov 30, 2021 · 0 comments

Comments

@arwedus
Copy link

arwedus commented Nov 30, 2021

Describe the bug

In a project with the following directory structure:

|- build
|- source
|  |- conf.py
|  `- index.rst
|- Makefile

and the following command to build:

 sphinx-build -M html source build -w build/sphinx_build_warnings.log 

I get the following error if the "build" directory does not exist yet:

sphinx-build: error: cannot open warning file 'build/sphinx_build_warnings.log': [Errno 2] No such file or directory: 'build/sphinx_build_warnings.log'

How to Reproduce

$ sphinx-build -M html source build -w build/sphinx_build_warnings.log 

Expected behavior

I would expect sphinx-build to create the relative path to the warning logfile for me instead of failing, because this is how it handles the build output path as well.

Your project

should not be necessary

Screenshots

No response

OS

Linux Ubuntu 20.04

Python version

3.8.9

Sphinx version

4.3.1

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants