Closed vsbuffalo closed 3 years ago
Thanks for the bug report @vsbuffalo, we'll get this sorted for the next release (which I think we want to do quite soon).
I wonder if this is some tricky interaction with pyslim and how it's subclassing tskit.TreeSequence though?
Thanks for the report, I'll look into this now.
This is due to pyslim.SlimTreeSequence
having a differing __init__
signature to tskit.TreeSequence
. I've fixed this by hardcoding the __init__
reference in __setstate__
in tskit-dev/tskit#1556 which seems the right way to fix.
On further thinking we realised that this is better fixed in pyslim so have transferred the issue.
I've run into an unexpected exception with tskit 0.3.6 — a description and MRE are below. The zip file tskit_mre.zip contains a SLiM simulation routine based on recipe 17.1 and an example tree sequence with metadata. Loading the tree using pyslim and trying to pickle and unpickle it as below,
leads to the following error,
This is with tskit 0.3.6 — on a different machine with 0.3.5, this works fine, so I suspect this is a regression from this change in how pickled tree sequences are initialized: https://github.com/tskit-dev/tskit/pull/1298/files#diff-ecbb802115b51a593926a3015f4ff2ec444fa4dc4915af74f4959abc60c84df8L3318. I would submit a PR, but I'm not sure the best way to initialize the object in a way that preserves the metadata.