zooniverse / panoptes-cli

A command-line interface for Panoptes
Apache License 2.0
18 stars 5 forks source link

The encoding is not specified when opening the manifest file on Windows #79

Open CKrawczyk opened 6 years ago

CKrawczyk commented 6 years ago

When working with the aggregation code I found out that on Windows the default encoding used for opening a file is not UTF-8, and caused issues with non-English characters in the file. It could be the cause of the issues seen here: https://www.zooniverse.org/talk/18/673942

Could be fixed by adding encoding='utf-8' to open function call on this line: https://github.com/zooniverse/panoptes-cli/blob/69b42da427465be962c4f2308919ebc044cff654/panoptes_cli/commands/subject_set.py#L169

adammcmaster commented 4 years ago

The encoding option seems to have been added in Python 3, so I don't think we can do anything about this while we're will supporting Python 2.

When we do eventually fix this, we should probably add a command-line option to allow the user to specify the encoding rather than always forcing it to UTF-8 (but UTF-8 should probably be the default).