10000 Fix classify text tutorial · peleitor/python-docs-samples@4231057 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4231057

Browse files
author
Jon Wayne Parrott
committed
Fix classify text tutorial
Change-Id: Ib86df7cf37588b7a7fc0c7f4ad4fc70548152354
1 parent e99175f commit 4231057

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

language/classify_text/classify_text_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def index(path, index_file):
8989
except Exception:
9090
print('Failed to process {}'.format(file_path))
9191

92-
with io.open(index_file, 'w') as f:
93-
f.write(json.dumps(result).encode('utf-8'))
92+
with io.open(index_file, 'w', encoding='utf-8') as f:
93+
f.write(json.dumps(result))
9494

9595
print('Texts indexed in file: {}'.format(index_file))
9696
return result

0 commit comments

Comments
 (0)
0