Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

TH3 not writeable #76

@jrueb

Description

@jrueb

When I try write a TH3 to a file, I get
TypeError: type TH3 from module __main__ is not writeable by uproot

I took a look at convert.py from uproot_methods and it seems there are lines for TH1 and TH2 but not for TH3. I added the two lines

elif any(x == ("uproot_methods.classes.TH3", "Methods") or x == ("TH3", "Methods") for x in types(obj.__class__, obj)):
 return (None, None, "uproot.write.objects.TH", "TH")

and it worked. And reason why these lines aren't in there? Could they be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions