From b89f6fa011c6f49e3e04041c6646c045ffe45845 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Tue, 25 Aug 2020 17:13:33 +0200 Subject: [PATCH] Fix meta defaults and error in package command --- spacy/cli/package.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spacy/cli/package.py b/spacy/cli/package.py index 523e8a99a..4e5038951 100644 --- a/spacy/cli/package.py +++ b/spacy/cli/package.py @@ -77,7 +77,9 @@ def package( meta = generate_meta(meta, msg) errors = validate(ModelMetaSchema, meta) if errors: - msg.fail("Invalid model meta.json", "\n".join(errors), exits=1) + msg.fail("Invalid model meta.json") + print("\n".join(errors)) + sys.exit(1) model_name = meta["lang"] + "_" + meta["name"] model_name_v = model_name + "-" + meta["version"] main_path = output_dir / model_name_v @@ -118,10 +120,10 @@ def get_meta( "lang": "en", "name": "model", "version": "0.0.0", - "description": None, - "author": None, - "email": None, - "url": None, + "description": "", + "author": "", + "email": "", + "url": "", "license": "MIT", } meta.update(existing_meta)