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

error trying to import model from json file #367

Closed
rodriguez-facundo opened this issue Sep 14, 2018 · 1 comment
Closed

error trying to import model from json file #367

rodriguez-facundo opened this issue Sep 14, 2018 · 1 comment
Assignees

Comments

@rodriguez-facundo
Copy link
Collaborator

rodriguez-facundo commented Sep 14, 2018

  • error:
    line 69 in netpyne.sim.load.py is using object_hook to convert data loaded with JSON package.
    data = json.load(fileObj, object_hook=_byteify)
  • Expected behaviour
    load a json file and save the strings as Unicode type
  • Current behaviour:
    load.json loads the dictionary, and applies the _bitify function leaving all Unicode text as binary type, resulting in no data being accessible by the GUI
  • NOTE:
    that works for python 2 because there is a difference between string and Unicode, but py3 adopted Unicode as standard
@salvadord
Copy link
Collaborator

probably will need to add a condition to check if running py2 or py3

@rodriguez-facundo rodriguez-facundo changed the title py3 tries to convert unicode to str in python 3 which is default str error trying to import model from json file Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants