Skip to content

assigning to ts.tables.metadata does not produce an error message - need read only tables #1906

@petrelharp

Description

@petrelharp

For instance:

>>> ts = msprime.simulate(10)
>>> ts.tables.metadata = b'abc'
>>> ts.tables.metadata
b''

>>> ts.tables.metadata_schema

>>> basic_schema = tskit.MetadataSchema({'codec': 'json'})
>>> ts.tables.metadata_schema = basic_schema
>>> ts.tables.metadata_schema

These are immutable, so probably ought to throw an error. This caught @vsbuffalo just now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Python APIIssue is about the Python APIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions