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: Datasets with many rows fail to load due to incorrect variable type #3926

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

carez
Copy link
Contributor

@carez carez commented Aug 30, 2023

Issue

Fixes #3925

MAX_NUMBER_OF_ROWS is defined with a float literal, thus if a dataset has more than MAX_NUMBER_OF_ROWS, rowCount() returns a float instead of int and the dataset does not load.

>>> type(10e6)
<class 'float'>

Fix

Set limits as integers, not floats.

@vallsv
Copy link
Contributor

vallsv commented Sep 1, 2023

Thanks a lot for that fix.
I wasn't aware of that.
It maybe depends on the Python version?

@vallsv vallsv merged commit 1b06508 into silx-kit:main Sep 1, 2023
7 checks passed
@vallsv
Copy link
Contributor

vallsv commented Sep 1, 2023

Be careful i have sckatched your changes

@t20100
Copy link
Member

t20100 commented Sep 1, 2023

Thanks for the fix!

That can also depends on pyqt versions, and it's not something we're getting into so often.

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.

Datasets with many rows fail to load due to incorrect variable type
4 participants