Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

PythonNext() argument read is not valid: Dynamic cast failed #45

@Crispy13

Description

@Crispy13
from nucleus.protos import reads_pb2
from nucleus.io import sam

read_requirements = reads_pb2.ReadRequirements()
sam_reader = sam.SamReader(
      input_path="NA12878_sliced.bam", read_requirements=read_requirements)

for r in sam_reader:
    print(r)
RuntimeError: PythonNext() argument read is not valid: Dynamic cast failed
2023-12-27 16:25:36.748166: W [.nucleus/util/proto_clif_converter.h:60)] Failed to cast type N6google8protobuf14DynamicMessageE
  • Versions:
Python 3.8.18
tensorflow                   2.13.1
protobuf                     3.20.3
google-nucleus               0.6.0

Any recommendations?
I'm trying to run this example: https://blog.tensorflow.org/2019/01/using-nucleus-and-tensorflow-for-dna.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions