Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

literal_eval on integers #3

Open
tkmmark opened this issue Sep 8, 2020 · 0 comments
Open

literal_eval on integers #3

tkmmark opened this issue Sep 8, 2020 · 0 comments

Comments

@tkmmark
Copy link

tkmmark commented Sep 8, 2020

This applies to mesh_qad_pseudo.py's data method and any other methods that call literal_eval

consider changing
literal_eval(key)
to
literal_eval(key) if not isinstance(key, int) else key

There is some underlying assumption that dictionary keys of mesh elements will necessarily be strings in many of compas_singular's methods
Perhaps this is because of the way datastructures are serialised in earlier versions of COMPAS, which stringify all keys as json.dump tends to do...
However, this causes issues when the keys are already integers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant