diff --git a/main.py b/main.py index 9d61759..2b5cf07 100644 --- a/main.py +++ b/main.py @@ -43,7 +43,12 @@ import json import OpenSSL.crypto as crypto from future.utils import bytes_to_native_str as n from logbook import Logger, StreamHandler -from json.decoder import JSONDecodeError + +try: + from json.decoder import JSONDecodeError +except ImportError: + JSONDecodeError = ValueError # type: ignore + from nio import RemoteProtocolError, RemoteTransportError, TransportType