This should fix https://github.com/OpenTreeOfLife/peyotl/issues/142 but I have not tested on a machine that is set up to run the full set of peyotl maintainer tests. So I don't know for certain that there aren't other side effect. It should be safe, I think.
A couple of things to note:
the bug was the failure to encode the unicode object as 'utf-8' in one of the branches of code. I'm guessing that TreeBase previously returned ascii but that they have changed to utf-8 recently. So we were getting away without converting unicode to str before.
It looks like TreeBase no longer treats edge IDs as stable. So that complicates our testing that we get back the same content that we expected. I'm not sure if this is a new "feature" or not. I thought those were supposed to be stable.
This should fix https://github.com/OpenTreeOfLife/peyotl/issues/142 but I have not tested on a machine that is set up to run the full set of peyotl maintainer tests. So I don't know for certain that there aren't other side effect. It should be safe, I think.
A couple of things to note:
unicode
tostr
before.