Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: logo64.png: No such file or directory #527

Closed
lenianiva opened this issue Oct 5, 2023 · 6 comments
Closed

[Bug]: logo64.png: No such file or directory #527

lenianiva opened this issue Oct 5, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@lenianiva
Copy link

lenianiva commented Oct 5, 2023

Current Behavior

I created a python kernel using the instructions here, and it gave this error:

error (ignored): error: end of string reached
error:
       … while calling the 'getAttr' builtin

         at /builtin/derivation.nix:19:19: (source not available)

       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: getting status of '/nix/store/g1xm5mkbhv8r135zsr8zdmarmffmrzby-source/logo64.png': No such file or directory

Expected Behavior

Jupyter would start running

Steps To Reproduce

  1. Create the following files: flake.nix from nix flake init --template github:tweag/jupyenv. Modify kernels.nix:
{pkgs, ...}: {
  kernel.python.minimal = {
    enable = true;
    projectDir = ./.;
  };
}
  1. pyproject.toml from https://github.com/tweag/jupyenv/blob/main/docs/documentation/how-to.md
[tool.poetry]
name = "jupyter-nix-kernel-ipython"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.9"
numpy = "^1.23.0"
ipykernel = "^6.15.0"

[tool.poetry.dev-dependencies]
# build systems for dependencies
hatchling = "^1.3.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
  1. Execute poetry lock
  2. nix run

OS

this path will be fetched (0.00 MiB download, 0.00 MiB unpacked):
  /nix/store/fyvbj5mvrvdnvhbx6hc977wsgl33pk3i-nix-info
copying path '/nix/store/fyvbj5mvrvdnvhbx6hc977wsgl33pk3i-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.5-arch1-1, Arch Linux, noversion, rolling`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - nixpkgs: `/home/aniva/.nix-defexpr/channels/nixpkgs`

Version

97f76f9

The previous version does not have the issue with logo64.png, but it still has issue with flit_core

3ad2c95

Additional Context

touch logo64.png creates a different problem:

error: builder for '/nix/store/bzarby67w4hwgxjql9s4dakm474wpf9x-python3.10-editables-0.5.drv' failed with exit code 2;
       last 10 log lines:
       >   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
       >   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
       >   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
       >   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
       >   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
       >   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
       >   File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
       > ModuleNotFoundError: No module named 'flit_core'
       >
       >
       For full logs, run 'nix log /nix/store/bzarby67w4hwgxjql9s4dakm474wpf9x-python3.10-editables-0.5.drv'.
error: 1 dependencies of derivation '/nix/store/9bd3yw7bym0bzlwsk28nn3l6acrsvvyc-python3-3.10.9-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/igb3jmn1n124yrhgx4bqmr2s0j5cdy3d-wrapper-python3-3.10.9-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/znb4mmyffp209il1lzgsrp9pb0ky29f5-python-minimal-jupyter-kernel.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xm6wwyqvjvvskcl2pa2jvi0fazlmcgyg-wrapper-chmod-python3-3.10.9-env.drv' failed to build

Relevant log output

No response

@lenianiva lenianiva added the bug Something isn't working label Oct 5, 2023
@lenianiva lenianiva changed the title [Bug]: logo64.png: No such file or directory [Bug]: logo64.png: No such file or directory/No module named flit_core Oct 5, 2023
@lenianiva lenianiva changed the title [Bug]: logo64.png: No such file or directory/No module named flit_core [Bug]: logo64.png: No such file or directory Oct 5, 2023
@lenianiva
Copy link
Author

The solution about flit_core can be found here:

There is some python package with a build dependency that poetry2nix is

@GTrunSec
Copy link
Collaborator

GTrunSec commented Oct 5, 2023

The solution about flit_core can be found here:

if you don't know how to solve that issue via overrides.nix with poetry2nix. Please try my PR branch to get the native nixpkgs support for the kernels.

GTrunSec added a commit to GTrunSec/jupyterWith that referenced this issue Oct 5, 2023
@GTrunSec
Copy link
Collaborator

GTrunSec commented Oct 5, 2023

solved -> ba06739

@trevex
Copy link

trevex commented Oct 19, 2023

Thanks @GTrunSec,

I ran into the same issue and tried using your branch, e.g.

inputs.jupyenv.url = "github:GTrunSec/jupyterWith/chore";

Unfortunately this results in another error on nix run:

trace: warning: Unknown rpds-py version: '0.10.6'. Please update getCargoHash.
error: getting status of '/nix/store/g7lkqdx4wdz77p5lbsbx038956jhg813-source/logo-64x64.png': No such file or directory

The warning I attribute to https://discourse.nixos.org/t/poetry2nix-mismatch-cryptography-sha256-but-unable-to-modify/33897

The error happens as nix is looking for the logo in the kernel's projectDir. As a workaround I copied the logo over, which then makes nix run still error, but most likely due to an issue in poetry2nix as outlined in the above Discourse:

trace: warning: Unknown rpds-py version: '0.10.6'. Please update getCargoHash.
error: hash mismatch in fixed-output derivation '/nix/store/hcl9xsg13zccln3q1cknclvbvl4ckdry-rpds-py-0.10.6-vendor.tar.gz.drv':
         specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
            got:    sha256-8bXCTrZErdE7JhuoudU/4dDndCMwvjy2a+2IY0DWDzg=

I saw there is a new mkPoetryKernel function. Should this be used in the future instead for a Poetry-based Python kernel?

GTrunSec added a commit to GTrunSec/jupyterWith that referenced this issue Oct 19, 2023
@GTrunSec
Copy link
Collaborator

@trevex
for the logo error is a bug for sure(will be fixed tomorrow)
second, if you don't know how to override the package with poetry2nix like https://github.com/GTrunSec/dataflow2nix/blob/main/nix/prefect/packages/overrides.nix#L23
just use the native python env: a56c43d#diff-459c8fd464b8b23e4b2f8ebb00690d572772b9a755aa7a5cce5d4574079edfa1R4

@GTrunSec
Copy link
Collaborator

@trevex
fixed e8a9d57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants