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

overflowing integers cause IDs to be incorrect (and leads to wrong representation) #288

Open
Styx13 opened this issue Feb 28, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@Styx13
Copy link

Styx13 commented Feb 28, 2018

Hello,

I just had a case where I am trying to create a graph and noticed its representation was wrong given the list of nodes and edges given as inputs.

The reason turns out to be that my nodes used very long numbers as ID (int64 that were stored as strings in a database).

In my case I am using Python (Jupyter notebook), and I doubled checked that the IDs I use when I build my node list are actually stored as strings in Python.

However, it is probably the javascript code generated by Brunel that tries to convert those strings into integers (because in my case my IDs are only numbers).
JavaScript does not support 64 bits integers and thus the IDs were no longer correct, leading to wrong data representation.

A workaround in my case was just to prefix all my ID with "id_" which would prevent Javascript from trying to convert my strings IDs into integers.

@grahamwills grahamwills self-assigned this Apr 18, 2018
@grahamwills grahamwills added this to the 2.6 milestone Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants