Skip to content

Need to specify encoding for json load #1174

Description

@HajimeShimizu

CORE version: 0.10.0

When adding custom standards, following error message is pop up.

"UnicodeDecodeError: 'cp932' codec can't decode byte 0xef in position 0: illegal multibyte sequence"

On windows, json.load method try to apply 'cp932' encoding as a default. In general, JSON files are created by UTF-8 (without BOM) and need to fix. One idea is to add encoding option.

f = open('test.json', 'r', encoding='utf-8')

In this case, following will be target.
cdisc_rules_engine/services/cache/cache_populator_service.py
def add_custom_standard_to_cache(self)

Image

In a meantime, solution is to save JSON file in Shift-JIS encoding.

Metadata

Metadata

Assignees

Type

Fields

Priority

None yet

T-shirt sizing

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions