Skip to content

to_array(scalar) has bad error message #1410

@jnothman

Description

@jnothman
text.to_array(spacy.attrs.LEMMA)

raises

ValueError: Buffer has wrong number of dimensions (expected 1, got 0)

when it should either work or be clearer in the error: it expects a list, not a single attr.

Info about spaCy

  • spaCy version: 1.9.0
  • Python version: 3.5.2
  • Platform: Darwin-16.7.0-x86_64-i386-64bit
  • Installed models: en

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests and improvementshelp wantedContributions welcome!help wanted (easy)Contributions welcome! (also suited for spaCy beginners)🌙 nightlyDiscussion and contributions related to nightly builds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions