synapseutils.sync.generateManifest() UnicodeEncodingError in python 2

Description

Fix is to use io.open(encoding='utf8') instead of open()

User reported issue in GitHub:
https://github.com/Sage-Bionetworks/synapsePythonClient/issues/530

Environment

None

Activity

Show:
Ziming Dong
April 25, 2018, 7:02 PM

To validate: use Python 2 and call generateManifest() passing in entities with metadata (e.g. name) containing Unicode characters:

卄乇尺乇 卂尺乇 丂口从乇 凵𠘨工匚口刀乇 匚卄卂尺卂匚丅乇尺丂 下口尺 丅乇丂丅工𠘨厶

Kimyen Truong
April 25, 2018, 9:02 PM

In python2, I run the following commands:

This created a file:


I opened the file and can see the Unicode written correctly.

Assignee

Ziming Dong

Reporter

Ziming Dong

Labels

None

Validator

Kimyen Truong

Development Area

None

Release Version History

None

Fix versions

Priority

Major
Configure