#12789·wandb

[Bug]: Video: align stream annotations with supported input types

Author: humdrum00001010Created Sep 10, 2026Updated Sep 15, 2026

Describe the bug

wandb.Video includes TextIO in its data_or_path annotation, but the stream-handling branch accepts io.BytesIO. A regular text stream reaches the unsupported-input error without its contents being read. The documented binary-buffer form works.

Main retains the TextIO union arm and BytesIO-only stream handling.

Minimal reproduction

python
import base64
from io import BytesIO, StringIO
import wandb

gif = base64.b64decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")
wandb.Video(BytesIO(gif), format="gif")  # succeeds
wandb.Video(StringIO(gif.decode("latin1")), format="gif")
ValueError: wandb.Video accepts a file path or numpy like data as input

The required format is supplied. This concerns the advertised stream type; it does not require adding a textual video encoding. No run or server is involved.

Expected behavior

Make the stream annotation agree with the actual supported input forms.

Environment

  • W&B SDK: 0.30.0; relevant source is identical on main 8f93d444e29e4d1a50a888899f51051012ee2679
  • Python: 3.12.12
  • OS: macOS 26.1, arm64
  • W&B server: not applicable