Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4231057

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

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎language/classify_text/classify_text_tutorial.py

Copy file name to clipboardExpand all lines: language/classify_text/classify_text_tutorial.py
+2-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.