diff --git a/rosetta/text/vw_helpers.py b/rosetta/text/vw_helpers.py index 2119d5f..9a62f42 100644 --- a/rosetta/text/vw_helpers.py +++ b/rosetta/text/vw_helpers.py @@ -579,7 +579,7 @@ def print_topics( outstr += "\n" + sorted_topic.to_string() + "\n" with smart_open(outfile, 'w') as f: - f.write(outstr) + f.write(outstr.encode('utf-8')) @property def pr_token_g_topic(self):