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
Grid component can load data from Excel at page creation time but not after button is clicked #165
Comments
Update: it actually does work with smaller (10 Kb) xls file containing only two lines inside, but doesn't work with 20 Kb xls file containing ~460 lines and Unicode characters.
But the JSON is created by |
There is |
There is the following code in
but for some reason it fails to change all nan values to None... some are left intact. |
It's because two columns in the pandas DataFrame have float64 dtype, others have object. |
Found a workaround:
Still unclear why does it work at page creation time without jumping through all these hoops. |
As a side note, fairly recently JustPy added the row_data_converter parameter to AgGrid. That was meant to help with these kinds of problems. Issue#500. |
Thanks for reporting and investigating this issue. I'll close it for now since |
I have the following code:
It works and the data is displayed.
But if I comment the last line and run
load_pandas_frame
in, say, button click handler function, nothing is displayed, and eventable.update()
doesn't help.Digging into JustPy sources, it seems that an error is thrown on update saying datetime objects are not JSON serializable. It is silently swallowed by NiceGUI, only "Problem with websocket update, ignoring" message is printed.
But why does it work at the page creation time?..
The text was updated successfully, but these errors were encountered: