Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying a port in the connection string leads to an error #152

Open
merhovon opened this issue Jul 15, 2024 · 0 comments
Open

Specifying a port in the connection string leads to an error #152

merhovon opened this issue Jul 15, 2024 · 0 comments

Comments

@merhovon
Copy link

Hello everyone,

I use the following connection parameter which leads to the problem:

connection_string = f"ibmi://{user}:{password}@{host}:{port}/{database}?current_schema={schema}"

The error is then thrown here:

def create_connect_args(self, url):
    opts = url.translate_connect_args(username="user", host="system")
    opts.update(url.query)

    # Allow both our specific keywords and the SQLAlchemy base keywords
    allowed_opts = (
        set(self.DRIVER_KEYWORD_MAP.keys())
        | self.DRIVER_KEYWORDS_SPECIAL
        | {"autocommit", "readonly", "timeout"}
    )

    if not allowed_opts.issuperset(opts.keys()):
        raise ValueError("Option entered not valid for IBM i Access ODBC Driver")

How can I specify a port and is SSL not supported for the connection string?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant