From 3fc3b7a13af2e15d8cb0cc90860d7861d3ad7ddf Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Wed, 22 Sep 2021 21:01:34 +0200 Subject: [PATCH] avoid crash when unicode in title (#9254) --- spacy/cli/project/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/cli/project/run.py b/spacy/cli/project/run.py index 3736a6e1c..74c8b24b6 100644 --- a/spacy/cli/project/run.py +++ b/spacy/cli/project/run.py @@ -1,6 +1,7 @@ from typing import Optional, List, Dict, Sequence, Any, Iterable from pathlib import Path from wasabi import msg +from wasabi.util import locale_escape import sys import srsly import typer @@ -135,7 +136,7 @@ def print_run_help(project_dir: Path, subcommand: Optional[str] = None) -> None: print("") title = config.get("title") if title: - print(f"{title}\n") + print(f"{locale_escape(title)}\n") if config_commands: print(f"Available commands in {PROJECT_FILE}") print(f"Usage: {COMMAND} project run [COMMAND] {project_loc}")