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

TypeError: unsupported operand type(s) for /: 'str' and 'str' #11581

Closed
ericwb opened this issue Aug 11, 2023 · 4 comments
Closed

TypeError: unsupported operand type(s) for /: 'str' and 'str' #11581

ericwb opened this issue Aug 11, 2023 · 4 comments
Labels
builder:json extensions:sphinxcontrib Relating to the sphinxcontrib-* extensions type:bug

Comments

@ericwb
Copy link

ericwb commented Aug 11, 2023

Describe the bug

Running the sphinx-build with the -b json argument results in an exception. If I take away the json argument, it compiles fine.

As shown below, the exception is coming out of sphinx internally.

Running Sphinx v7.1.2
building [mo]: targets for 0 po files that are out of date
writing output... 
building [json]: targets for 42 source files that are out of date
updating environment: [new config] 42 added, 0 changed, 0 removed
reading sources... [100%] rules/python/third_party/index
looking for now-outdated files... none found
pickling environment... done
/Users/ericwb/workspace/precli/docs/source/man/precli.rst: WARNING: document isn't included in any toctree
checking consistency... done
preparing documents... done
copying assets... copying static files... done
copying extra files... done
done
writing output... [100%] rules/python/third_party/index
generating indices... genindex py-modindex done
highlighting module code... 
writing additional pages... search done

Exception occurred:
  File "/Users/ericwb/workspace/precli/.tox/docs/lib/python3.11/site-packages/sphinxcontrib/serializinghtml/__init__.py", line 105, in handle_finish
    outfilename = self.outdir / self.globalcontext_filename
                  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for /: 'str' and 'str'
The full traceback has been saved in /var/folders/m3/_cy_9dfx73107r3w_zhnsd700000gn/T/sphinx-err-corq7276.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
docs: exit 2 (1.27 seconds) /Users/ericwb/workspace/precli> sphinx-build -b json docs/source docs/build pid=86055
.pkg: _exit> python /Users/ericwb/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  docs: FAIL code 2 (10.15=setup[8.87]+cmd[1.27] seconds)
  evaluation failed :( (10.21 seconds)

How to Reproduce

sphinx-build -b json docs/source docs/build

Environment Information

Platform:              darwin; (macOS-13.4-arm64-arm-64bit)
Python version:        3.11.4 (main, Jun 17 2023, 15:03:18) [Clang 14.0.3 (clang-1403.0.22.14.1)])
Python implementation: CPython
Sphinx version:        7.1.2
Docutils version:      0.20.1
Jinja2 version:        3.1.2
Pygments version:      2.

Sphinx extensions

[
    "sphinx.ext.autodoc",
    "sphinx.ext.doctest",
    "sphinx.ext.coverage",
    "sphinx.ext.viewcode",
    "sphinx_copybutton",
]

Additional context

No response

@picnixz
Copy link
Member

picnixz commented Aug 12, 2023

Thank you for the report. @AA-Turner, I think you forgot one place to fix.

@carltongibson
Copy link
Contributor

I can confirm this. It looks like a blocker for #11583, I think? 🤔

@picnixz picnixz added the extensions:sphinxcontrib Relating to the sphinxcontrib-* extensions label Aug 14, 2023
@AA-Turner
Copy link
Member

Fixed in sphinxcontrib-serializinghtml 1.1.8.

A

@carltongibson
Copy link
Contributor

@AA-Turner hero! Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder:json extensions:sphinxcontrib Relating to the sphinxcontrib-* extensions type:bug
Projects
None yet
Development

No branches or pull requests

4 participants