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

docs: use read_only=False so that example doesn't raise an exception. #1079

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

dhirschfeld
Copy link
Contributor

I tried to run a query using the example connection from the README and it raised an error.

This change allows running a query using the example connection attributes:

engine = sa.create_engine(
    'duckdb:///:memory:',
    connect_args={
        'read_only': True,
        'config': {
            'memory_limit': '500mb'
        }
    }
)
with engine.connect() as conn:
    res = conn.execute(sa.text("select 1")).scalar_one()
CatalogException: Catalog Error: Cannot launch in-memory database in read-only mode!
<snip>
The above exception was the direct cause of the following exception:
<snip>
ProgrammingError: (duckdb.duckdb.CatalogException) Catalog Error: Cannot launch in-memory database in read-only mode!
(Background on this error at: https://sqlalche.me/e/20/f405)

@Mause Mause changed the title Use read_only=False so that example doesn't raise an exception. doc: use read_only=False so that example doesn't raise an exception. Sep 2, 2024
Copy link

conventional-commit-lint-gcf bot commented Sep 2, 2024

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@Mause Mause changed the title doc: use read_only=False so that example doesn't raise an exception. docs: use read_only=False so that example doesn't raise an exception. Sep 2, 2024
@Mause Mause enabled auto-merge (squash) September 2, 2024 07:06
@Mause Mause disabled auto-merge September 2, 2024 07:06
@Mause Mause merged commit d0688b4 into Mause:main Sep 2, 2024
6 of 9 checks passed
@Mause
Copy link
Owner

Mause commented Sep 2, 2024

Thanks!

@dhirschfeld dhirschfeld deleted the patch-1 branch September 2, 2024 08:56
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

Successfully merging this pull request may close these issues.

2 participants