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

RUN poetry install: Readme path /README.md does not exist. #2288

Open
An-anonymous-coder opened this issue Jan 27, 2025 · 3 comments
Open

RUN poetry install: Readme path /README.md does not exist. #2288

An-anonymous-coder opened this issue Jan 27, 2025 · 3 comments
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed High Priority Indicates an issue that requires immediate attention and should be addressed as soon as possible

Comments

@An-anonymous-coder
Copy link

An-anonymous-coder commented Jan 27, 2025

System OS

Docker

Python Version

3.11 (CPython)

Install Source

GitHub

Install version / commit hash

3fe4828

Expected Behavior vs Actual Behavior

Expected Behavior

docker build -t spotdl . is expected to work without any errors.

Actual Behavior

spotDL cannot be built in Docker, and errors with the following message:

13.67 Installing the current project: spotdl (4.2.11)
13.67 
13.67 Error: The current project could not be installed: Readme path `/README.md` does not exist.
13.67 If you do not want to install the current project use --no-root.
13.67 If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
13.67 If you did intend to install the current project, you may need to set `packages` in your pyproject.toml file.
13.67 
------
Dockerfile:24
--------------------
  22 |     
  23 |     # Install spotdl requirements
  24 | >>> RUN poetry install
  25 |     
  26 |     # Add source code files to WORKDIR
--------------------
ERROR: failed to solve: process "/bin/sh -c poetry install" did not complete successfully: exit code: 1

Steps to reproduce - Ensure to include actual links!

  1. Install Raspberry Pi OS Lite (64-bit) on a Raspberry Pi 5
  2. Setup the OS to your liking
  3. Follow the instructions to Install Docker Engine on Debian using the apt repository
  4. git clone https://github.com/spotDL/spotify-downloader
  5. cd spotify-downloader
  6. From spotDL installation for Docker Setup: sudo docker build -t spotdl .
    Note: The command needs to be run with sudo, which the documentation does not mention.
  7. Observe as an error occurs when the script attempts to RUN poetry install

Traceback

[+] Building 21.1s (9/13)                                                                                            docker:default
 => [internal] load build definition from Dockerfile                                                                           0.0s
 => => transferring dockerfile: 761B                                                                                           0.0s
 => [internal] load metadata for docker.io/library/python:3-alpine                                                             0.6s
 => [internal] load .dockerignore                                                                                              0.0s
 => => transferring context: 80B                                                                                               0.0s
 => [1/9] FROM docker.io/library/python:3-alpine@sha256:f9d772b2b40910ee8de2ac2b15ff740b5f26b37fc811f6ada28fce71a2542b0e       0.0s
 => [internal] load build context                                                                                              0.0s
 => => transferring context: 3.21kB                                                                                            0.0s
 => CACHED [2/9] RUN apk add --no-cache     ca-certificates     ffmpeg     openssl     aria2     g++     git     py3-cffi      0.0s
 => CACHED [3/9] RUN pip install --upgrade pip poetry wheel spotipy                                                            0.0s
 => CACHED [4/9] COPY poetry.lock pyproject.toml /                                                                             0.0s
 => ERROR [5/9] RUN poetry install                                                                                            20.0s
------                                                                                                                              
 > [5/9] RUN poetry install:                                                                                                        
1.367 Creating virtualenv spotdl-il7asoJj-py3.13 in /root/.cache/pypoetry/virtualenvs                                               
1.708 Installing dependencies from lock file                                                                                        
2.025                                                                                                                               
2.025 Package operations: 110 installs, 0 updates, 0 removals                                                                       
2.025 
2.026   - Installing six (1.17.0)
2.370   - Installing mergedeep (1.3.4)
2.370   - Installing markupsafe (3.0.2)
2.372   - Installing platformdirs (4.3.6)
2.373   - Installing python-dateutil (2.9.0.post0)
2.374   - Installing pyyaml (6.0.2)
2.719   - Installing click (8.1.8)
2.720   - Installing ghp-import (2.1.0)
2.722   - Installing markdown (3.7)
2.722   - Installing mdurl (0.1.2)
2.723   - Installing jinja2 (3.1.5)
2.724   - Installing mkdocs-get-deps (0.2.0)
2.725   - Installing pathspec (0.12.1)
2.726   - Installing packaging (24.2)
2.774   - Installing pyyaml-env-tag (0.1)
2.809   - Installing watchdog (6.0.0)
4.969   - Installing idna (3.10)
4.970   - Installing mkdocs (1.6.1)
4.970   - Installing propcache (0.2.1)
4.971   - Installing typing-extensions (4.12.2)
4.972   - Installing sniffio (1.3.1)
4.974   - Installing markdown-it-py (3.0.0)
4.975   - Installing multidict (6.1.0)
4.976   - Installing uc-micro-py (1.0.3)
5.568   - Installing annotated-types (0.7.0)
5.569   - Installing anyio (3.7.1)
5.571   - Installing iniconfig (2.0.0)
5.572   - Installing certifi (2024.12.14)
5.572   - Installing mdformat (0.7.21)
5.573   - Installing charset-normalizer (3.4.1)
5.574   - Installing linkify-it-py (2.0.3)
5.575   - Installing colorama (0.4.6)
5.647   - Installing mkdocs-autorefs (1.3.0)
5.668   - Installing pluggy (1.5.0)
5.685   - Installing pydantic-core (2.27.2)
5.692   - Installing pymdown-extensions (10.14)
5.699   - Installing setuptools (75.8.0)
5.704   - Installing soupsieve (2.6)
5.716   - Installing urllib3 (2.3.0)
5.784   - Installing wcwidth (0.2.13)
5.786   - Installing wrapt (1.17.2)
5.792   - Installing yarl (1.18.3)
6.078   - Installing altgraph (0.17.4)
6.078   - Installing beautifulsoup4 (4.12.3)
6.078   - Installing coverage (7.6.10)
6.080   - Installing dill (0.3.9)
6.080   - Installing astroid (3.3.8)
6.083   - Installing deprecated (1.2.15)
6.084   - Installing dacite (1.8.1)
6.084   - Installing babel (2.16.0)
6.147   - Installing griffe (1.5.4)
6.167   - Installing h11 (0.14.0)
6.175   - Installing isort (5.13.2)
6.228   - Installing jaconv (0.4.0)
6.234   - Installing mccabe (0.7.0)
6.320   - Installing mdformat-tables (1.0.0)
6.335   - Installing mdit-py-plugins (0.4.2)
6.365   - Installing mkdocs-material-extensions (1.3.1)
6.394   - Installing mkdocstrings (0.26.2)
6.442   - Installing mypy-extensions (1.0.0)
6.455   - Installing paginate (0.5.7)
6.462   - Installing pydantic (2.10.5)
6.507   - Installing pygments (2.19.1)
6.588   - Installing pyinstaller-hooks-contrib (2024.11)
6.593   - Installing pytest (8.3.4)
6.596   - Installing rapidfuzz (3.11.0)
6.600   - Installing redis (5.2.1)
6.894   - Installing regex (2024.11.6)
6.899   - Installing requests (2.32.3)
6.935   - Installing starlette (0.27.0)
7.032   - Installing text-unidecode (1.3)
7.159   - Installing tomlkit (0.13.2)
7.161   - Installing types-urllib3 (1.26.25.14)
7.260   - Installing unidecode (1.3.8)
7.293   - Installing vcrpy (6.0.2)
8.549   - Installing black (24.10.0)
8.550   - Installing mdformat-gfm (0.3.7)
8.551   - Installing mkdocs-gen-files (0.5.0)
8.552   - Installing mkdocs-section-index (0.3.9)
8.553   - Installing mkdocstrings-python (1.13.0)
8.553   - Installing fastapi (0.103.2)
8.555   - Installing mkdocs-literate-nav (0.6.1)
8.556   - Installing mkdocs-material (9.5.49)
8.623   - Installing mutagen (1.47.0)
8.633   - Installing mypy (1.14.1)
8.671   - Installing pyfakefs (5.7.4)
8.711   - Installing pyinstaller (6.11.1)
8.730   - Installing pykakasi (2.3.0)
8.738   - Installing pylint (3.3.3)
8.809   - Installing pytest-asyncio (0.21.2)
8.838   - Installing pytest-cov (6.0.0)
8.948   - Installing pytest-mock (3.14.0)
9.045   - Installing pytest-recording (0.13.2)
9.054   - Installing pytest-subprocess (1.5.3)
9.111   - Installing python-slugify (8.0.4)
9.204   - Installing pytube (15.0.0)
9.210   - Installing rich (13.9.4)
9.248   - Installing soundcloud-v2 (1.6.0)
9.361   - Installing spotipy (2.25.0)
9.385   - Installing syncedlyrics (1.0.1)
9.404   - Installing types-orjson (3.6.2)
9.477   - Installing types-python-slugify (8.0.2.20240310)
9.506   - Installing types-requests (2.31.0.6)
9.523   - Installing types-setuptools (75.8.0.20250110)
9.538   - Installing types-toml (0.10.8.20240310)
9.576   - Installing types-ujson (5.10.0.20240515)
9.606   - Installing uvicorn (0.23.2)
9.630   - Installing websockets (14.1)
9.640   - Installing yt-dlp (2025.1.15)
9.676   - Installing ytmusicapi (1.9.1)
13.67 
13.67 Installing the current project: spotdl (4.2.11)
13.67 
13.67 Error: The current project could not be installed: Readme path `/README.md` does not exist.
13.67 If you do not want to install the current project use --no-root.
13.67 If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
13.67 If you did intend to install the current project, you may need to set `packages` in your pyproject.toml file.
13.67 
------
Dockerfile:24
--------------------
  22 |     
  23 |     # Install spotdl requirements
  24 | >>> RUN poetry install
  25 |     
  26 |     # Add source code files to WORKDIR
--------------------
ERROR: failed to solve: process "/bin/sh -c poetry install" did not complete successfully: exit code: 1

Other details

No response

@An-anonymous-coder An-anonymous-coder added the Bug Unexpected problem or unintended behavior that needs to be fixed label Jan 27, 2025
@Silverarmor Silverarmor added the High Priority Indicates an issue that requires immediate attention and should be addressed as soon as possible label Jan 29, 2025
@keltakmaster
Copy link

Hi! I managed to get it work by modifying the Dockerfile like this:

FROM python:3-alpine

LABEL maintainer="xnetcat (Jakub)"

# Install dependencies
RUN apk add --no-cache \
    ca-certificates \
    ffmpeg \
    openssl \
    aria2 \
    g++ \
    git \
    py3-cffi \
    libffi-dev \
    zlib-dev

# Install poetry and update pip/wheel
RUN pip install --upgrade pip poetry wheel spotipy

# Copy requirements files
COPY poetry.lock pyproject.toml .

# Install spotdl requirements
RUN poetry install --no-root

# Add source code files to WORKDIR
ADD . .

# Install spotdl itself
RUN poetry install

# Create music directory
RUN mkdir /music

# Create a volume for the output directory
VOLUME /music

# Change CWD to /music
WORKDIR /music

# Entrypoint command
ENTRYPOINT ["poetry", "run", "spotdl"]

@stickmanChampion
Copy link

stickmanChampion commented Feb 3, 2025

It does build but after I can't run the commands.

docker run --rm -v $(pwd):/music spotdl download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b
Creating virtualenv spotdl-1HQUp4N1-py3.13 in /root/.cache/pypoetry/virtualenvs
Warning: 'spotdl' is an entry point defined in pyproject.toml, but it's not installed as a script. You may get improper `sys.argv[0]`.

The support to run uninstalled scripts will be removed in a future release.

Run `poetry install` to resolve and get rid of this message.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import sys; from importlib import import_module; sys.argv = ['spotdl', 'download', 'https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b']; sys.exit(import_module('spotdl').console_entry_point())
                                                                                                                                                          ~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/music/spotdl/__init__.py", line 13, in <module>
    from spotdl.console import console_entry_point
  File "/music/spotdl/console/__init__.py", line 5, in <module>
    from spotdl.console.entry_point import console_entry_point
  File "/music/spotdl/console/entry_point.py", line 12, in <module>
    from spotdl.console.download import download
  File "/music/spotdl/console/download.py", line 7, in <module>
    from spotdl.download.downloader import Downloader
  File "/music/spotdl/download/downloader.py", line 17, in <module>
    from yt_dlp.postprocessor.modify_chapters import ModifyChaptersPP
ModuleNotFoundError: No module named 'yt_dlp'

@tiagovrtr
Copy link

Poetry 2.0 has been released and it includes breaking changes, you should make the necessary changes to pyproject.toml or pin it to v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed High Priority Indicates an issue that requires immediate attention and should be addressed as soon as possible
Projects
None yet
Development

No branches or pull requests

5 participants