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

ValueError: Unsupported Python object None of type <class 'NoneType'> #21

Closed
NPN opened this issue Aug 29, 2020 · 2 comments
Closed

ValueError: Unsupported Python object None of type <class 'NoneType'> #21

NPN opened this issue Aug 29, 2020 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@NPN
Copy link

NPN commented Aug 29, 2020

$ cat null.json
null
$ graphtage null.json null.json
Traceback (most recent call last):
  File "/sbin/graphtage", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/graphtage/__main__.py", line 286, in main
    from_tree = from_format.build_tree_handling_errors(from_path, options)
  File "/usr/lib/python3.8/site-packages/graphtage/json.py", line 254, in build_tree_handling_errors
    return self.build_tree(path=path, options=options)
  File "/usr/lib/python3.8/site-packages/graphtage/json.py", line 250, in build_tree
    return build_tree(json.load(f), options)
  File "/usr/lib/python3.8/site-packages/graphtage/json.py", line 70, in build_tree
    raise ValueError(f"Unsupported Python object {python_obj!r} of type {type(python_obj)}")
ValueError: Unsupported Python object None of type <class 'NoneType'>

The same happens with JSON files like [null] and {"a": null}. Version is 0.2.1.

@FGRibreau
Copy link

Thanks for your report, I had the same issue ({"a": null} case)

@ESultanik ESultanik self-assigned this Aug 31, 2020
@ESultanik ESultanik added bug Something isn't working good first issue Good for newcomers labels Aug 31, 2020
@ESultanik
Copy link
Collaborator

This is fixed in 0.2.2.

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

No branches or pull requests

3 participants