Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitca014f8

Browse files
author
Gauvain Pocentek
committed
docs: add a note for python 3.5 for file content update
The data passed to the JSON serializer must be a string with python 3.Document this in the exemples.Fix#175
1 parent4689e73 commitca014f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎docs/gl_objects/projects.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@
229229
f.save(branch_name='master',commit_message='Update testfile')
230230

231231
# or for binary data
232-
f.content=base64.b64encode(open('image.png').read())
232+
# Note: decode() is required with python 3 for data serialization. You can omit
233+
# it with python 2
234+
f.content=base64.b64encode(open('image.png').read()).decode()
233235
f.save(branch_name='master',commit_message='Update testfile',encoding='base64')
234236
# end files update
235237

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp