From 558350454c3efaf640e6b97c4883f7a2dc958a25 Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Mon, 5 Jun 2023 13:44:09 -0400 Subject: [PATCH] Fix JSONDecoder 'encoding' bug (#649) * Fix serialization bug * Revert "Fix serialization bug" This reverts commit 72a08bc8c5b92833334d8a2edbd3950c08f39259. * Try suggested fix * check for 'encoding' --- qiskit_ibm_provider/utils/json.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qiskit_ibm_provider/utils/json.py b/qiskit_ibm_provider/utils/json.py index c64434e7e..8b7eeb38a 100644 --- a/qiskit_ibm_provider/utils/json.py +++ b/qiskit_ibm_provider/utils/json.py @@ -263,6 +263,7 @@ class RuntimeDecoder(json.JSONDecoder): """JSON Decoder used by runtime service.""" def __init__(self, *args: Any, **kwargs: Any): + kwargs.pop("encoding", None) super().__init__(object_hook=self.object_hook, *args, **kwargs) self.__parameter_vectors: Dict[str, Tuple[ParameterVector, set]] = {} self.__read_parameter_expression = (