Skip to content

Empty template for nbsphinx_input_prompt and nbsphinx_output_prompt lead to TypeError: not all arguments converted during string formatting #10792

@1kastner

Description

@1kastner

Describe the bug

In my documentation, my idea was to hide the prompts. I wanted to be clever and just use an empty template for nbsphinx_input_prompt and nbsphinx_output_prompt. However, this lead to the following exception: TypeError: not all arguments converted during string formatting.

How to Reproduce

nbsphinx_input_prompt =nbsphinx_output_prompt = ""

Expected behavior

Maybe the filling of the variable could be more forgiving? So %s is only inserted in the template if such a variable is available in the template in the first place? I think this is better than tempering with HTML and CSS.

Your project

not applicable

Screenshots

No response

OS

Win

Python version

3.10

Sphinx version

5.1

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions