Skip to content

[BUG] read_text doesn't apply a default #11804

Closed

Description

@wence-

Describe the bug

read_text advertisers delimiter=None (with perhaps some presumption that a default delimiter is put in place). In practice, no such thing occurs.

Steps/Code to reproduce bug

import cudf
from io import StringIO

series = cudf.read_text(StringIO("foo bar"))

=> File text.pyx:33, in cudf._lib.text.read_text()

AttributeError: 'NoneType' object has no attribute 'encode'

Expected behavior

Should not get an AttributeError. Either a sensible default should be supplied, or the delimiter argument should be mandatory (and checked for str-iness).

Activity

  1. added
    bug
    Needs Triage
    on Sep 28, 2022
  2. added
    cuIO
    and removed
    Needs Triage
    on Sep 29, 2022
  3. GregoryKimball commented on Sep 29, 2022

    @GregoryKimball
    Contributor

    @upsj I would be happy to either use \n default value or make delimiter a required argument. Please let me know if this turns out to be tricky.

  4. upsj commented on Sep 29, 2022

    @upsj

    I ran into the same issue and included a fix in #11802, i.e. making it a required argument (still need to add a cast to str though)

  5. linked a pull request that will close this issueAdd BGZIP reader to python `read_text` #11802on Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcuIO

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions