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

mysterious sphinx error #1

Closed
rytis-paskauskas opened this issue Dec 5, 2021 · 1 comment
Closed

mysterious sphinx error #1

rytis-paskauskas opened this issue Dec 5, 2021 · 1 comment

Comments

@rytis-paskauskas
Copy link

rytis-paskauskas commented Dec 5, 2021

Guys, never been able to build the docs (but building ESP32 projects with esp-idf goes smoothly, so I guess the installation is OK)
Any help to resolving this issue and pointers towards successfully building the help/manual, will be most appreciated.
Here's the /tmp/sphinx-err-[a-z]*.txt file.

# Sphinx version: 2.3.1
# Python version: 3.9.9 (CPython)
# Docutils version: 0.18.1 release
# Jinja2 version: 3.0.3
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/home/me/.espressif/python_env/idf5.0_py3.9_env/lib/python3.9/site-packages/sphinx/cmd/build.py", line 272, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/home/me/.espressif/python_env/idf5.0_py3.9_env/lib/python3.9/site-packages/sphinx/application.py", line 257, in __init__
    self.config.setup(self)
  File "/home/me/.espressif/python_env/idf5.0_py3.9_env/lib/python3.9/site-packages/esp_docs/conf_docs.py", line 334, in setup
    app.add_config_value('build_dir', os.environ['BUILDDIR'], 'env')
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'BUILDDIR'

The above is a result of
python -u -m sphinx.cmd.build -j 1 -b html -d /path-to/esp-idf/docs/_build/en/esp32/doctrees -w sphinx-warning-log.txt -t esp32 -D idf_target=esp32 -D docs_to_build= -D config_dir=/path-to/.local/lib/python3.9/site-packages/esp_docs -D doxyfile_dir=/path-to/esp-idf/docs -D project_path=/path-to/esp-idf/path-to/esp-idf/docs/en /path-to/esp-idf/docs/_build/en/esp32/html
which is my translation of build-docs -l en -t esp32, in which I substituted /usr/bin/python with python, the latter being a link to the binaries that the API expects.

@rytis-paskauskas rytis-paskauskas changed the title should it be feasible to build docs locally? mysterious sphinx error Dec 5, 2021
@ESP-Marius
Copy link
Collaborator

Hi, sorry for the late reply.

build_docs.py injects a environment variable called BUILDDIR, which is missing if you call sphinx directly like this. You can try exporting this before running it. It's the link to the build directory for the docs (the build output), so e.g. path-to/esp-idf/path-to/esp-idf/docs/en /path-to/esp-idf/docs/_build/en/esp32 in your case.

Just curious, any reason why you need to invoke it this way instead of letting build-docs handle it?

espressif-bot pushed a commit that referenced this issue May 7, 2024
Support Python 3.12

Closes #1

See merge request espressif/esp-docs!109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants