From 82f5f1f98fe572910b5c5c1762ed73ac8ba677e6 Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 17 Apr 2017 01:29:54 +0200 Subject: [PATCH] Replace str with compat.unicode_ --- spacy/cli/info.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spacy/cli/info.py b/spacy/cli/info.py index 50844257f..1d1bc2f51 100644 --- a/spacy/cli/info.py +++ b/spacy/cli/info.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import platform from pathlib import Path +from ..compat import unicode_ from .. import about from .. import util @@ -13,10 +14,10 @@ def info(model=None, markdown=False): data = util.parse_package_meta(util.get_data_path(), model, require=True) model_path = Path(__file__).parent / util.get_data_path() / model if model_path.resolve() != model_path: - data['link'] = str(model_path) - data['source'] = str(model_path.resolve()) + data['link'] = unicode_(model_path) + data['source'] = unicode_(model_path.resolve()) else: - data['source'] = str(model_path) + data['source'] = unicode_(model_path) print_info(data, "model " + model, markdown) else: data = get_spacy_data() @@ -34,7 +35,7 @@ def print_info(data, title, markdown): def get_spacy_data(): return { 'spaCy version': about.__version__, - 'Location': str(Path(__file__).parent.parent), + 'Location': unicode_(Path(__file__).parent.parent), 'Platform': platform.platform(), 'Python version': platform.python_version(), 'Installed models': ', '.join(list_models())