Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: permission error withpb.load_dataset() for duckdb on Windows#245

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
matt-humphrey wants to merge1 commit intoposit-dev:main
base:main
Choose a base branch
Loading
frommatt-humphrey:fix-duckdb-windows

Conversation

@matt-humphrey
Copy link
Contributor

Summary

There was an error with loading temporary file for duckdb on Windows.
I changed the code to explicitly close the Ibis connection, and that seems to have resolved the problem.

Related GitHub Issues and PRs

@matt-humphrey
Copy link
ContributorAuthor

matt-humphrey commentedJul 17, 2025
edited
Loading

My bad, I should have run all tests before pushing changes.

From what I gather, when pb.load_dataset() is used with duckdb, it's returning a live connection to the Ibis table. Hence a bunch of these tests failed, because I explicitly closed the connection.

The problem appears to be that Windows runs into permission errors due to maintaining that live connection beyond the function where that connection is defined. I'm not sure what an optimal solution is here - possibly converting the file into memory, and then closing the connection?

[EDIT]

Upon further investigation, part of the problem likely has to do with the test fixtures also returning live connections, for example:

@pytest.fixturedeftbl_dates_times_text_duckdb():file_path=pathlib.Path.cwd()/"tests"/"tbl_files"/"tbl_dates_times_text.ddb"withtempfile.TemporaryDirectory()astmp:fpath:Path=Path(tmp)/"tbl_dates_times_text.ddb"shutil.copy(file_path,fpath)returnibis.connect(f"duckdb://{fpath!s}").table("tbl_dates_times_text")

Part of the solution might be changing these fixtures also.

gregorywaynepower reacted with eyes emoji

@gregorywaynepower
Copy link
Contributor

@matt-humphrey Are you saying that these tests need to be edited as well?

@matt-humphrey
Copy link
ContributorAuthor

@gregorywaynepower yes, it's been a while so I can revise and identify exactly which tests need to be edited, but running on Windows I was running into problems with most tests with duckdb.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@matt-humphrey@gregorywaynepower

[8]ページ先頭

©2009-2025 Movatter.jp