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

Grid does not appear and "Error: Could not create a model." logged in console in latest version #537

Open
kerrick-js opened this issue Aug 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kerrick-js
Copy link

kerrick-js commented Aug 19, 2024

Summary

When I try to display a DataGrid with ipydatagrid 1.3.2, the grid doesn't render, and I see "Error: Could not create a model." logged in the Javascript console. This doesn't happen with ipydatagrid 1.2.1.

To reproduce

Run this code:

import pandas as pd
from ipydatagrid import DataGrid
 
df = pd.DataFrame(
    {
        "stock": ["AAPL", "MSFT"],
        "price": [224.0, 419.0],
    },
)
 
DataGrid(df)

Expected result

A grid appears

Actual result

No grid appears

I also see this message in the Javascript console:

Error: Could not create a model.
    at utils.js:119:27
[...]

along with a few of these errors:

kernel.js:1010 Couldn't process kernel message TypeError: e is not iterable
    at Module.g (index.js?v=20240819093341:2:40230)
    at d._updatePrimaryKeyMap (index.js?v=20240819093341:2:928472)
[...]

System info

ipydatagrid 1.3.2
Jupyter notebook classic version 6.4.13
Python 3.10.13
IPython 8.26.0
Chrome Version 127.0.6533.119 (Official Build) (64-bit)

Notes

  • ipydatagrid 1.2.1 works; I don't see this bug.
  • I see two of the TypeError: e is not iterable errors with ipydatagrid 1.2.1, but there are 15 of them with ipydatagrid 1.3.2.
@martinRenou martinRenou added the bug Something isn't working label Aug 19, 2024
@hugetim
Copy link

hugetim commented Oct 21, 2024

I was experiencing a similar issue (and likewise with 1.3.1). Reverting to 1.2.1 fixed it.

@hugetim
Copy link

hugetim commented Oct 28, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants