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

TypeError: Object of type int64 is not JSON serializable #216

Open
bmaz opened this issue Oct 13, 2023 · 1 comment
Open

TypeError: Object of type int64 is not JSON serializable #216

bmaz opened this issue Oct 13, 2023 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@bmaz
Copy link
Contributor

bmaz commented Oct 13, 2023

Oops I used pandas

import pandas as pd

table = pd.read_csv(file)

graph = table_to_bipartite_graph(
    table, 
    first_part_col="nom", 
    second_part_col="mentions", 
    first_part_data=["sexe", "twitter_description", "twitter_followers"]
)
Sigma(graph, node_color="part", node_size="twitter_followers").to_html("graph.html")

TypeError: Object of type int64 is not JSON serializable

@Yomguithereal Yomguithereal added bug Something isn't working enhancement New feature or request labels Oct 16, 2023
@Yomguithereal
Copy link
Member

I propose to cast int64 as serializable JSON ints if they don't exceed 53 bits. Else, we should raise an error explaining those values should be cast to string instead.

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

No branches or pull requests

2 participants