Skip to content

database doesn't return protocol version #517

Description

@romanesko

I have connection:

conn_info = {'host': 'localhost',
                 'port': 5433,
                 'user': 'user',
                 'password': '123456',
                 'database': 'bigData'}

connection = vertica_python.connect(**conn_info)

and I got error:

KeyError: 'protocol_version'

it falls from here: [connection.py]

        # Complex types metadata is returned since protocol version 3.12
        self.complex_types_enabled = self.parameters['protocol_version'] >= (3 << 16 | 12) and \
                                     self.parameters.get('request_complex_types', 'off') == 'on'
        self._logger.info('Connection is ready')

here is the log of self.parameters:

{'server_version': 'v7.1.1-0', 'long_string_types': 'on', 'standard_conforming_strings': 'on', 'client_locale': 'en_US@collation=binary'}

can be fixed in connection.py with

self.complex_types_enabled = self.parameters.get('protocol_version',0) >= (3 << 16 | 12) and \

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions