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

Fix - load_workbook with read_only option when do reading #1815

Merged

Conversation

trgiangdo
Copy link
Member

This PR fixes the failing test on taipy-integration-testing.
The test results can be found in Avaiga/taipy-integration-testing#67.

The reason is that the openpyxl.load_workbook() can only be closed when the loaded file is read/write only.
On MacOS and Linux, it's fine. However, on Windows, the file is not cleaned automatically, which makes the next test to fail.

@trgiangdo trgiangdo added the 💥Malfunction Addresses an identified problem. label Sep 21, 2024
@trgiangdo trgiangdo self-assigned this Sep 21, 2024
Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
18779 16277 87% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/core/data/excel.py 85% 🟢
TOTAL 85% 🟢

updated for commit: 38a376c by action🐍

@jrobinAV
Copy link
Member

How did you figure it out? Is there any reason for this?

In any case, that's excellent!

Copy link
Member

@jrobinAV jrobinAV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@trgiangdo
Copy link
Member Author

How did you figure it out? Is there any reason for this?

From the docstring of the openpyxl.close() method

@jrobinAV
Copy link
Member

How did you figure it out? Is there any reason for this?

From the docstring of the openpyxl.close() method

Yep. In other words: "I should have read the fucking doc!" 🤣

@trgiangdo trgiangdo merged commit 19b7103 into develop Sep 21, 2024
126 of 128 checks passed
@trgiangdo trgiangdo deleted the fix/window-doesnt-close-excel-file-read-by-pandas branch September 21, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💥Malfunction Addresses an identified problem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants