From 6bfb87071ea70e2a0e05bc5124f082f0ef9bea62 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 6 Mar 2017 20:57:26 +0000 Subject: [PATCH] Use PYTHONIOENCODING=utf-8 for invites invocation Since the send.py script for invites uses print to emit progress including the names of contacts to which messages are sent, redirecting stdout of the script to a local file can result in encoding errors if some of the names include non-ASCII codepoints (but not when stdout is your interactive terminal). Setting PYTHONIOENCODING=utf-8 in the calling environment works around this nicely. Change-Id: I52b70c64f8b3a20da5143b31c5090192b0c75c99 --- tools/invite2summit/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/invite2summit/README.rst b/tools/invite2summit/README.rst index e31c4fde85..98c45ad83f 100644 --- a/tools/invite2summit/README.rst +++ b/tools/invite2summit/README.rst @@ -15,10 +15,10 @@ You use it like this: to escape them like ``... a $$600-off discount code ...`` so as to avoid raising *ValueError: Invalid placeholder in string: line , col * -- Run a test with ``python send.py atc_sample.csv codes_sample.csv`` +- Run a test with ``PYTHONIOENCODING=utf-8 python send.py atc_sample.csv codes_sample.csv > sent_sample.csv`` Should work on stock Ubuntu. When ready, run the real thing with:: - $ python send.py atc.csv codes.csv > sent.csv + $ PYTHONIOENCODING=utf-8 python send.py atc.csv codes.csv > sent.csv