`config_name: no` is parsed as a boolean and breaks `load_dataset` for every config

#2
by javi22 - opened

Hi! Loading any subset of this dataset currently fails with datasets, even when you only ask for a single language:

from datasets import load_dataset

load_dataset(
    "open-index/open-wikipedia-markdown",
    data_files=["data/es/*.parquet"],
    split="train",
    streaming=True
)
  File ".../datasets/builder.py", line 129, in __post_init__
    if invalid_char in self.name:
       ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'bool' is not iterable

Root cause: the README's YAML header has this entry for Norwegian:

  - config_name: no
    data_files:
      - split: train
        path: data/no/*.parquet

YAML 1.1 reads an unquoted no as the boolean False, not the string "no" (the well-known "Norway problem"). When datasets loads the repo, it builds a BuilderConfig for every config listed in the README. Its name validation (invalid_char in self.name) then fails because self.name is False. Since all the configs are parsed before one is selected, every language is affected: passing name="es" or a specific data_files pattern doesn't help.

Fix: quote the config name in the README (it appears twice, around lines 420 and 2025):

  - config_name: "no"

Workaround until then: use the generic parquet builder with hf:// paths. This skips the README entirely:

load_dataset(
    "parquet",
    data_files="hf://datasets/open-index/open-wikipedia-markdown/data/es/*.parquet",
    split="train",
    streaming=True
)

Thanks for the dataset!

Sign up or log in to comment