Skip to content

Io_error: Can't follow stream path #8639

Closed

Description

@francoisthire

Describe the bug

The error seems internal to nu . At some point, I also got a Broken pipe error, but I did not manage to reproduce the issue.

> update value (get value)                                                                                               
Error: nu::shell::io_error

  × I/O error
  help: can't follow stream paths

How to reproduce

Just run the snippet given above.

Expected behavior

A better error message. Probably the correct syntax is to use curly brackets, and the error message could make such a suggestion.

Screenshots

No response

Configuration

version | transpose key value | to md --pretty

key value
version 0.77.1
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.69.0-beta.2 (2602aa81a 2023-03-17)
rust_channel beta-x86_64-unknown-linux-gnu
cargo_version cargo 1.69.0-beta.2 (9880b408a 2023-02-28)
build_time 2023-03-26 19:39:11 +02:00
build_rust_channel release
features default, zip
installed_plugins

Additional context

No response

Activity

  1. added
    A:error-unhelpful
    on Mar 27, 2023
  2. fdncred commented on Mar 27, 2023

    @fdncred
    Contributor

    I believe update/insert/upsert need an input like $table | update column {|r| $r.column | do_something}. However, the error message isn't helpful.

  3. francoisthire commented on Mar 27, 2023

    @francoisthire
    Author

    The error does not depend on the input. If you give an input with a field named value you get the same issue. It is just while minimising the bug, I discovered I got the same error without an input.

  4. fdncred commented on Mar 27, 2023

    @fdncred
    Contributor

    Oh, I see what you mean. I don't think it's supposed to work with parenthesis anymore. It's a closure like ls | update name {|| get name}

  5. ranile commented on Sep 21, 2023

    @ranile

    I've also encountered this error while trying to use the not operator:

    ls | where (get name | str starts-with aaa) | where (not (get name | str contains xxx))
    Error: nu::shell::io_error
    
      × I/O error
      help: can't follow stream paths
  6. fdncred commented on Sep 21, 2023

    @fdncred
    Contributor

    Agreed, that the error message could be better. Here's how a command similar to yours that works.

    ❯ ls | where {|n| ($n.name | str starts-with C) and (not ($n.name | str ends-with toml))}
    ╭#┬───────name───────┬type┬──size──┬──modified──╮
    │0│CODE_OF_CONDUCT.md│file│  3.5 KB│5 months ago│
    │1│CONTRIBUTING.md   │file│ 19.1 KB│3 weeks ago │
    │2│Cargo.lock        │file│154.8 KB│a day ago   │
    ╰─┴──────────────────┴────┴────────┴────────────╯
  7. added this to the v0.86.0 milestone on Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:error-unhelpfulgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions