diff --git a/moto/core/responses.py b/moto/core/responses.py index ed4792083..0f133e72c 100644 --- a/moto/core/responses.py +++ b/moto/core/responses.py @@ -5,6 +5,7 @@ import datetime import json import logging import re +import io import pytz from moto.core.exceptions import DryRunClientError @@ -622,7 +623,7 @@ class AWSServiceSpec(object): def __init__(self, path): self.path = resource_filename('botocore', path) - with open(self.path, "rb") as f: + with io.open(self.path, 'r', encoding='utf-8') as f: spec = json.load(f) self.metadata = spec['metadata'] self.operations = spec['operations']