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

"Failed to normalize readme path README.md" when it exists #2060

Closed
1 of 2 tasks
EricLBuehler opened this issue Apr 26, 2024 · 7 comments · Fixed by #2074
Closed
1 of 2 tasks

"Failed to normalize readme path README.md" when it exists #2060

EricLBuehler opened this issue Apr 26, 2024 · 7 comments · Fixed by #2074
Labels
bug Something isn't working

Comments

@EricLBuehler
Copy link

Bug Description

When I run maturin publish, detects a missing README.md when it does exist in that directory.

Your maturin version (maturin --version)

1.5.0

Your Python version (python -V)

3.12.1

Your pip version (pip -V)

23.3.1

What bindings you're using

pyo3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  1. maturin publish
2024-04-26T14:46:47.973181Z DEBUG maturin::project_layout: Found pyproject.toml in working directory at "/home/ericbuehler/mistral.rs/mistralrs-pyo3/pyproject.toml"
2024-04-26T14:46:47.973436Z DEBUG maturin::project_layout: Using cargo manifest path from working directory: "/home/ericbuehler/mistral.rs/mistralrs-pyo3/Cargo.toml"
2024-04-26T14:46:47.973710Z DEBUG maturin::project_layout: Resolving cargo metadata from "/home/ericbuehler/mistral.rs/mistralrs-pyo3/Cargo.toml"
2024-04-26T14:46:48.273308Z DEBUG maturin::project_layout: Project layout resolved project_root=/home/ericbuehler/mistral.rs/mistralrs-pyo3 python_dir=/home/ericbuehler/mistral.rs/mistralrs-pyo3 rust_module=/home/ericbuehler/mistral.rs/mistralrs-pyo3/mistralrs python_module=/home/ericbuehler/mistral.rs/mistralrs-pyo3/mistralrs extension_name=mistralrs module_name=mistralrs
🔗 Found pyo3 bindings
2024-04-26T14:46:48.359927Z DEBUG maturin::python_interpreter: Found CPython interpreter at /home/ericbuehler/miniconda3/envs/pytorch-3.12/bin/python3
🐍 Found CPython 3.12 at /home/ericbuehler/miniconda3/envs/pytorch-3.12/bin/python3
📡 Using build options features from pyproject.toml
2024-04-26T14:46:48.360632Z DEBUG maturin::compile: Setting PYO3_PYTHON to /home/ericbuehler/miniconda3/envs/pytorch-3.12/bin/python3
2024-04-26T14:46:48.360712Z DEBUG maturin::compile: Running env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.12-64bit" PYO3_PYTHON="/home/ericbuehler/miniconda3/envs/pytorch-3.12/bin/python3" PYTHON_SYS_EXECUTABLE="/home/ericbuehler/miniconda3/envs/pytorch-3.12/bin/python3" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/ericbuehler/mistral.rs/mistralrs-pyo3/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-s"
    Finished release [optimized] target(s) in 0.21s
2024-04-26T14:46:49.407778Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0.dist-info/METADATA
2024-04-26T14:46:49.408344Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0.dist-info/WHEEL
2024-04-26T14:46:49.499270Z DEBUG maturin::module_writer: Adding mistralrs.libs/libcrypto-9208a0be.so.3 from /tmp/.tmpAiCufW/libcrypto-9208a0be.so.3
2024-04-26T14:46:49.824489Z DEBUG maturin::module_writer: Adding mistralrs.libs/libssl-bae9f8e0.so.3 from /tmp/.tmpAiCufW/libssl-bae9f8e0.so.3
🖨  Copied external shared libraries to package mistralrs.libs directory:
    /usr/lib/x86_64-linux-gnu/libssl.so.3
    /usr/lib/x86_64-linux-gnu/libcrypto.so.3
2024-04-26T14:46:49.938060Z DEBUG maturin::module_writer: Adding mistralrs/__init__.py
📖 Found type stub file at mistralrs.pyi
2024-04-26T14:46:49.938991Z DEBUG maturin::module_writer: Adding mistralrs/__init__.pyi from /home/ericbuehler/mistral.rs/mistralrs-pyo3/mistralrs.pyi
2024-04-26T14:46:49.939699Z DEBUG maturin::module_writer: Adding mistralrs/py.typed
2024-04-26T14:46:49.940159Z DEBUG maturin::module_writer: Adding mistralrs/mistralrs.cpython-312-x86_64-linux-gnu.so from /home/ericbuehler/mistral.rs/target/release/maturin/libmistralrs.so
2024-04-26T14:46:51.070729Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0.dist-info/RECORD
📦 Built wheel for CPython 3.12 to /home/ericbuehler/mistral.rs/target/wheels/mistralrs_pyo3-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
2024-04-26T14:46:51.225370Z DEBUG maturin::source_distribution: Found path dependencies: ["mistralrs-core", "mistralrs-lora"]
2024-04-26T14:46:51.225421Z DEBUG maturin::source_distribution: Found sdist root: /home/ericbuehler/mistral.rs
2024-04-26T14:46:51.225464Z DEBUG maturin::source_distribution: Adding path dependency: mistralrs-core at /home/ericbuehler/mistral.rs/mistralrs-core/Cargo.toml
2024-04-26T14:46:51.454670Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/Cargo.toml from /home/ericbuehler/mistral.rs/mistralrs-core/Cargo.toml
2024-04-26T14:46:51.454862Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/README.md from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/README.md
2024-04-26T14:46:51.454978Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/bintokens.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/bintokens.rs
2024-04-26T14:46:51.455363Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/bytes.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/bytes.rs
2024-04-26T14:46:51.455489Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/cfg.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/cfg.rs
2024-04-26T14:46:51.456416Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/lex.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/lex.rs
2024-04-26T14:46:51.457181Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/mod.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/mod.rs
2024-04-26T14:46:51.457261Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/recognizer.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/recognizer.rs
2024-04-26T14:46:51.457396Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/rx.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/rx.rs
2024-04-26T14:46:51.457533Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/svob.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/svob.rs
2024-04-26T14:46:51.457704Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/aici/toktree.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/aici/toktree.rs
2024-04-26T14:46:51.458467Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/device_map.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/device_map.rs
2024-04-26T14:46:51.458653Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/engine/mod.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/engine/mod.rs
2024-04-26T14:46:51.460032Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/layers.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/layers.rs
2024-04-26T14:46:51.460638Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/lib.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/lib.rs
2024-04-26T14:46:51.461554Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/model_loader.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/model_loader.rs
2024-04-26T14:46:51.461950Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/model_selected.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/model_selected.rs
2024-04-26T14:46:51.462472Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/gemma.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/gemma.rs
2024-04-26T14:46:51.464784Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/llama.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/llama.rs
2024-04-26T14:46:51.465264Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/mistral.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/mistral.rs
2024-04-26T14:46:51.465598Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/mixtral.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/mixtral.rs
2024-04-26T14:46:51.465981Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/mod.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/mod.rs
2024-04-26T14:46:51.466209Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/phi2.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/phi2.rs
2024-04-26T14:46:51.466732Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/phi3.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/phi3.rs
2024-04-26T14:46:51.467900Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/quantized_llama.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/quantized_llama.rs
2024-04-26T14:46:51.468994Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/quantized_phi2.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/quantized_phi2.rs
2024-04-26T14:46:51.469476Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/models/qwen2.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/models/qwen2.rs
2024-04-26T14:46:51.470260Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/pipeline/chat_template.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/pipeline/chat_template.rs
2024-04-26T14:46:51.470588Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/pipeline/ggml.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/pipeline/ggml.rs
2024-04-26T14:46:51.471389Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/pipeline/gguf.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/pipeline/gguf.rs
2024-04-26T14:46:51.472326Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/pipeline/loaders.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/pipeline/loaders.rs
2024-04-26T14:46:51.472762Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/pipeline/macros.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/pipeline/macros.rs
2024-04-26T14:46:51.473111Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/pipeline/mod.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/pipeline/mod.rs
2024-04-26T14:46:51.474521Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/pipeline/normal.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/pipeline/normal.rs
2024-04-26T14:46:51.475155Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/prefix_cacher.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/prefix_cacher.rs
2024-04-26T14:46:51.475596Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/request.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/request.rs
2024-04-26T14:46:51.475771Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/response.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/response.rs
2024-04-26T14:46:51.475979Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/sampler.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/sampler.rs
2024-04-26T14:46:51.476679Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/scheduler.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/scheduler.rs
2024-04-26T14:46:51.477295Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/sequence.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/sequence.rs
2024-04-26T14:46:51.478149Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/utils/mod.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/utils/mod.rs
2024-04-26T14:46:51.478666Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/utils/tokens.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/utils/tokens.rs
2024-04-26T14:46:51.478839Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/utils/varbuilder_utils.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/utils/varbuilder_utils.rs
2024-04-26T14:46:51.479281Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/classifier.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/classifier.rs
2024-04-26T14:46:51.479838Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/config.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/config.rs
2024-04-26T14:46:51.480017Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/gemma.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/gemma.rs
2024-04-26T14:46:51.480955Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/llama.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/llama.rs
2024-04-26T14:46:51.481633Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/mistral.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/mistral.rs
2024-04-26T14:46:51.482429Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/mixtral.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/mixtral.rs
2024-04-26T14:46:51.483645Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/mod.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/mod.rs
2024-04-26T14:46:51.484104Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/phi2.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/phi2.rs
2024-04-26T14:46:51.484798Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/phi3.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/phi3.rs
2024-04-26T14:46:51.485386Z DEBUG maturin::module_writer: Adding mistralrs_pyo3-0.1.0/mistralrs-core/src/xlora_models/quantized_llama.rs from /home/ericbuehler/mistral.rs/mistralrs-core/src/xlora_models/quantized_llama.rs
💥 maturin failed
  Caused by: Failed to build source distribution
  Caused by: failed to normalize readme path `README.md`
  Caused by: No such file or directory (os error 2)
@EricLBuehler EricLBuehler added the bug Something isn't working label Apr 26, 2024
@konstin
Copy link
Member

konstin commented Apr 26, 2024

(I'm not sure yet if that's a problem in the project layout or in maturin, but the error message is definitely bad)

@EricLBuehler
Copy link
Author

This is my project layout:

.
├── API.md
├── Cargo.toml
├── README.md
├── mistralrs.pyi
├── pyproject.toml
└── src

1 directory, 5 files

Is my project layout incorrect?

@konstin
Copy link
Member

konstin commented Apr 26, 2024

It looks like the problem is mistralrs-core not mistralrs, but i didn't get to looking in detail yet

@EricLBuehler
Copy link
Author

EricLBuehler commented Apr 26, 2024

@konstin, it looks like adding a README.md to each crate of my repo fixed this issue.

@messense
Copy link
Member

@EricLBuehler do you have a public repo for repro?

@EricLBuehler
Copy link
Author

EricLBuehler commented Apr 28, 2024

@messense, yes, here: https://github.com/EricLBuehler/mistral.rs

However, the error has been fixed by adding a README.md to every dependency crate.

@EricLBuehler
Copy link
Author

For future reference: this was solved by adding a README.md to every dependent crate in my project.

konstin added a commit that referenced this issue May 9, 2024
Old error message:

```console
$ maturin sdist --manifest-path ../mistral.rs/mistralrs-pyo3/Cargo.toml
 🔗 Found pyo3 bindings
 🐍 Found CPython 3.13 at /usr/local/bin/python3
 📡 Using build options features from pyproject.toml
 💥 maturin failed
   Caused by: Failed to build source distribution
   Caused by: failed to normalize readme path `/home/konsti/projects/mistral.rs/mistralrs-core/README.md`
   Caused by: No such file or directory (os error 2)
```

New error message:

```console
maturin sdist --manifest-path ../mistral.rs/mistralrs-pyo3/Cargo.toml
🔗 Found pyo3 bindings
🐍 Found CPython 3.13 at /usr/local/bin/python3
📡 Using build options features from pyproject.toml
💥 maturin failed
  Caused by: Failed to build source distribution
  Caused by: failed to normalize readme path `/home/konsti/projects/mistral.rs/mistralrs-core/README.md`
  Caused by: No such file or directory (os error 2)
```

Checking at https://github.com/EricLBuehler/mistral.rs/blob/86599c1adc5e4a07db50e8460676151f736c873f/mistralrs-core/Cargo.toml#L3, there was indeed a missing readme file.

Fixes #2060
messense pushed a commit that referenced this issue May 12, 2024
Old error message:

```console
$ maturin sdist --manifest-path ../mistral.rs/mistralrs-pyo3/Cargo.toml
 🔗 Found pyo3 bindings
 🐍 Found CPython 3.13 at /usr/local/bin/python3
 📡 Using build options features from pyproject.toml
 💥 maturin failed
   Caused by: Failed to build source distribution
   Caused by: failed to normalize readme path `/home/konsti/projects/mistral.rs/mistralrs-core/README.md`
   Caused by: No such file or directory (os error 2)
```

New error message:

```console
maturin sdist --manifest-path ../mistral.rs/mistralrs-pyo3/Cargo.toml
🔗 Found pyo3 bindings
🐍 Found CPython 3.13 at /usr/local/bin/python3
📡 Using build options features from pyproject.toml
💥 maturin failed
  Caused by: Failed to build source distribution
  Caused by: failed to normalize readme path `/home/konsti/projects/mistral.rs/mistralrs-core/README.md`
  Caused by: No such file or directory (os error 2)
```

Checking at https://github.com/EricLBuehler/mistral.rs/blob/86599c1adc5e4a07db50e8460676151f736c873f/mistralrs-core/Cargo.toml#L3, there was indeed a missing readme file.

Fixes #2060
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

Successfully merging a pull request may close this issue.

3 participants