Readthedocs 添加 html_logo 导致类型错误

Readthedocs adding html_logo causes type error

我在 readthedocs.io 上部署了一些文档。在我将以下行添加到 conf.py:

之前,它工作正常
html_logo = '_static/logo.png',

当我尝试在 readthedocs 上构建项目时,它失败并出现以下错误:

Running Sphinx v4.2.0
loading translations [en]... done
making output directory... done

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/project/envs/latest/lib/python3.7/site-packages/sphinx/events.py", line 101, in emit
    results.append(listener.handler(self.app, *args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/project/envs/latest/lib/python3.7/site-packages/sphinx/builders/html/__init__.py", line 1260, in validate_html_logo
    not path.isfile(path.join(app.confdir, config.html_logo)) and
  File "/home/docs/checkouts/readthedocs.org/user_builds/project/envs/latest/lib/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/home/docs/checkouts/readthedocs.org/user_builds/project/envs/latest/lib/python3.7/genericpath.py", line 153, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'tuple'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/project/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 279, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/home/docs/checkouts/readthedocs.org/user_builds/project/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 261, in __init__
    self.events.emit('config-inited', self.config)
  File "/home/docs/checkouts/readthedocs.org/user_builds/project/envs/latest/lib/python3.7/site-packages/sphinx/events.py", line 110, in emit
    (listener.handler, name), exc, modname=modname) from exc
sphinx.errors.ExtensionError: Handler <function validate_html_logo at 0x7f421c4a53b0> for event 'config-inited' threw an exception (exception: join() argument must be str or bytes, not 'tuple')

Extension error (sphinx.builders.html):
Handler <function validate_html_logo at 0x7f421c4a53b0> for event 'config-inited' threw an exception (exception: join() argument must be str or bytes, not 'tuple')

我的目录结构如下:

project/
├─ docs/
│  ├─ _static/
│  │  ├─ logo.png
│  ├─ conf.py
│  ├─ index.rst

将值从元组更改为字符串。

元组凭借尾随逗号

html_logo = '_static/logo.png',

只是一个字符串

html_logo = '_static/logo.png'