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

to_dict() on an empty tree fails #82

Open
TrigonaMinima opened this issue Nov 27, 2020 · 0 comments
Open

to_dict() on an empty tree fails #82

TrigonaMinima opened this issue Nov 27, 2020 · 0 comments

Comments

@TrigonaMinima
Copy link

While saving an empty tree TypeError is raised. Here's the code:

import rrcf
a = rrcf.RCTree()
a.to_dict()

and the stack trace:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda3/lib/python3.7/site-packages/rrcf/rrcf.py", line 748, in to_dict
    self._serialize(self.root, obj, duplicates)
  File "/anaconda3/lib/python3.7/site-packages/rrcf/rrcf.py", line 780, in _serialize
    raise TypeError('`node` must be Branch or Leaf instance')
TypeError: `node` must be Branch or Leaf instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant