2

I have some documentation deployed on readthedocs.io. It was working fine until I added the following line to my conf.py:

html_logo = '_static/logo.png',

As soon as I try to build the project on readthedocs it fails with the following error:

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')

My directory structure is as follows:

project/
├─ docs/
│  ├─ _static/
│  │  ├─ logo.png
│  ├─ conf.py
│  ├─ index.rst
mzjn
  • 48,958
  • 13
  • 128
  • 248
Computroniks
  • 85
  • 1
  • 11

1 Answers1

1

Change the value from a tuple to a string.

tuple by virtue of a trailing comma

html_logo = '_static/logo.png',

just a string

html_logo = '_static/logo.png'
Steve Piercy
  • 13,693
  • 1
  • 44
  • 57