sphinx-doc / sphinx-doc/sphinx

Sphinx Quickstart (PyCharm) crashes after giving authors name with Umlaut

Open
#9,247 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api:cmdline help wanted type:bug
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

After installing sphinx in a new venv (python 3.9) I used Sphinx Quickstart from PyCharm's Tool-menu. I think this simply called: D:\py_projects\sandbox\Enum_doc\venv\Scripts\sphinx-quickstart.exe. After giving an authors name, the quickstart crashes:

Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\py_projects\sandbox\Enum_doc\venv\Scripts\sphinx-quickstart.exe\__main__.py", line 7, in <module>
  File "d:\py_projects\sandbox\enum_doc\venv\lib\site-packages\sphinx\cmd\quickstart.py", line 586, in main
    ask_user(d)
  File "d:\py_projects\sandbox\enum_doc\venv\lib\site-packages\sphinx\cmd\quickstart.py", line 249, in ask_user
    d['author'] = do_prompt(__('Author name(s)'))
  File "d:\py_projects\sandbox\enum_doc\venv\lib\site-packages\sphinx\cmd\quickstart.py", line 148, in do_prompt
    x = term_input(prompt).strip()
  File "d:\py_projects\sandbox\enum_doc\venv\lib\site-packages\sphinx\cmd\quickstart.py", line 82, in term_input
    return input('')
  File "C:\Program Files\Python39\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 11: invalid start byte

I guess this is caused by Umlaut "ö" in the authors name. When using "oe" instead of "ö", quickstart finishes as expected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in sphinx/cmd/quickstart.py, especially the term_input and author prompt paths shown in the traceback. Reproduce sphinx-quickstart on Windows with an umlaut in the author name; done means the prompt accepts the name and quickstart completes without a UnicodeDecodeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.