diff --git a/vertica_python/vertica/connection.py b/vertica_python/vertica/connection.py index d0c64479..44aedc21 100644 --- a/vertica_python/vertica/connection.py +++ b/vertica_python/vertica/connection.py @@ -332,7 +332,7 @@ def __init__(self, options=None): self.startup_connection() # Complex types metadata is returned since protocol version 3.12 - self.complex_types_enabled = self.parameters['protocol_version'] >= (3 << 16 | 12) and \ + self.complex_types_enabled = self.parameters.get('protocol_version', 0) >= (3 << 16 | 12) and \ self.parameters.get('request_complex_types', 'off') == 'on' self._logger.info('Connection is ready')