nushell: unable to register (python) plugins

Describe the bug

register raises Plugin failed to load: Error spawning child process: No such file or directory (os error 2)

How to reproduce

Simple

> wget https://raw.githubusercontent.com/nushell/nushell/main/crates/nu_plugin_python/nu_plugin_python_example.py
> nu -c $'register "($env.PWD)/nu_plugin_python_example.py"; version'
Error: 
  × Error getting signatures
   ╭─[source:1:1]
 1 │ register "/home/shae/tmp/nu_plugin_python_example.py"; version
   · ────┬───
   ·     ╰── Plugin failed to load: Error spawning child process: No such file or directory (os error 2)
   ╰────

In a docker

Dockerfile:

FROM debian:stable-slim    
    
RUN apt-get update && \    
    apt-get install -y --no-install-recommends curl tar jq ca-certificates && \    
    update-ca-certificates && \    
    rm -rf /usr/share/doc /usr/share/man /usr/share/locale /usr/share/info /var/cache/apt /var/lib/apt/lists /var/log /var/lib/dpkg/*-old
    
RUN curl -L -o nu.tar.gz "$(curl -L "https://api.github.com/repos/nushell/nushell/releases" | jq -r '.[0].assets | .[] | select(.name|test("x86_64-unknown-linux-gnu.tar.gz$")) | .browser_download_url')" && \ 
    tar -xf nu.tar.gz nu && \
    rm nu.tar.gz && \
    mv nu /bin

ENTRYPOINT ["nu"]

then:

> docker build -t nushell .
> docker run --rm -it nushell

> # let nu create default configs
> fetch -r https://raw.githubusercontent.com/nushell/nushell/main/crates/nu_plugin_python/nu_plugin_python_example.py | save -r nu_plugin_python_example.py
> nu -c $'register "/nu_plugin_python_example.py"; version'
Error: 
  × Error getting signatures
   ╭─[source:1:1]
 1 │ register "/nu_plugin_python_example.py"; version
   · ────┬───
   ·     ╰── Plugin failed to load: Error spawning child process: No such file or directory (os error 2)
   ╰────

Expected behavior

I expect nu to load the official example plugin and not raise errors (at least in a fresh setup in a docker)

Screenshots

No response

Configuration

In docker:

key value
version 0.70.0
branch
commit_hash 9ef65dcd692b502d7476b1787247fae8638c2f0c
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.64.0 (a55dd71d5 2022-09-19)
rust_channel stable-x86_64-unknown-linux-gnu
cargo_version cargo 1.64.0 (387270bc7 2022-09-16)
pkg_version 0.70.0
build_time 2022-10-18 18:52:28 +00:00
build_rust_channel release
features database, dataframe, default, trash, which, zip
installed_plugins

Outside docker:

key value
version 0.70.0
branch
commit_hash 9ef65dcd692b502d7476b1787247fae8638c2f0c
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.64.0 (a55dd71d5 2022-09-19)
rust_channel stable-x86_64-unknown-linux-gnu
cargo_version cargo 1.64.0 (387270bc7 2022-09-16)
pkg_version 0.70.0
build_time 2022-10-18 18:52:28 +00:00
build_rust_channel release
features database, dataframe, default, trash, which, zip
installed_plugins

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 31 (16 by maintainers)

Most upvoted comments

a update in case this gets relevant again:
when i switched (all of the devices) to nixos the issue completely disappeared and didnt reappear.
i used the same (git-synced) dotfiles, same hardware, etc and it just worked.
maybe some program version (i used different repos except for 3rd party repos for nvim and i3) was at fault 🤷

Well, I was intrigued by this issue, since it seems so weird. However, this is definitely out of scope. Would be interesting, if somebody else came along and would experience the same issue. 😄

If this would be needed to be debugged, one would need to set up an OS from scratch and then apply all the configurations you have on your PC & Laptop, step by step

also thought about that but don’t want to work in a vm and currently don’t have a device i could just reset since i need all my devices and can’t really afford debugging stuff and manually finding and figuring out how to install all the dependencies again (i try to use apt, etc, but many things such a jdtls have to be installed manually).

I assume you have different versions on PC & Laptop, right?

my pc uses 6.0.2-76060002-generic (via pop-os 22.04 apt) and my laptop has 5.15.0-52-generic (via ubuntu 20.04 apt, but it is not the default kernel)

Either way, it’s extremely weird. It all feels like a huge user error, though we have now iterated through the steps so many times, it should’ve sufficed to determine such an error.

i agree - one of the reasons why i reported it was due to it happening within docker as well, but i don’t expect you to debug my computer or something.

one of the reasons for the issue was documentation of issues in case someone else has the same issue and there’s a similarity between the setups or something (which is common practice at my company).

i don’t know the policy on closing issues here (some close it if it gets stale, some only if the issue stopped occurring, etc) - if it is appropriate feel free to close the issue.