spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
16.91k stars 1.56k forks source link

typing in terminal does not show after 1st use of spotdl #1494

Closed LaGrabow closed 2 years ago

LaGrabow commented 2 years ago

System Operating System (OS)

Linux

Python Version

3.8 (CPython)

Install Source

pip / PyPi

Install version / commit hash

Version: 3.9.3

Expected Behavior vs Actual Behavior

I expected to see the letters/words show as I typed "spotdl [URL]" e.g. - spotdl https://open.spotify.com/album/4QtoNIqTWR3e5NVb833Bj2 BUT upon the 2nd time I typed "spotdl [URL]" in the same terminal session the typed letters did not show. I did discover that if I typed "spotdl [URL]" anyway, (even though I could not see the letters) and hit ENTER, it still worked.

Steps to reproduce

  1. open a terminal [bash Konsole]
  2. type spotdl [URL] << typed letters show 1st time
  3. la@localhost:~> spotdl https://open.spotify.com/album/4QtoNIqTWR3e5NVb833Bj2
  4. spotdl gets songs, converts them and places them in a designated folder.
  5. type spotdl [URL] << typed letters do NOT show 2nd, 3rd, 4th, ad infinitum, until terminal is closed.
  6. spotdl does work if I continue to type "spotdl" and paste the [URL] in and hit ENTER.
  7. It looks like this: la@localhost:~>
  8. The typed and pasted letters/words just don't show.

Traceback

There is no error message.

Other details

openSUSE Tumbleweed. KDE Desktop. I don't know of anything else that would be pertinent, but please let me know what I can do to give more info. Thanks

xnetcat commented 2 years ago

1451

xnetcat commented 2 years ago

tested on arch with alacritty terminal everything seems ok - v3.9.3

LaGrabow commented 2 years ago

I have, as suggested, uninstalled spotdl 3.9.3 and installed v4.

la@localhost:~> sudo pip uninstall spotdl
[sudo] password for root: 
Found existing installation: spotdl 3.9.3
Uninstalling spotdl-3.9.3:
  Would remove:
    /usr/local/bin/spotdl
    /usr/local/lib/python3.8/site-packages/spotdl-3.9.3.dist-info/*
    /usr/local/lib/python3.8/site-packages/spotdl/*
    /usr/local/lib/python3.8/site-packages/tests/*
Proceed (Y/n)? y
  Successfully uninstalled spotdl-3.9.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
la@localhost:~> pip install https://codeload.github.com/spotDL/spotdl-v4/zip/master
Defaulting to user installation because normal site-packages is not writeable
Collecting https://codeload.github.com/spotDL/spotdl-v4/zip/master
  Downloading https://codeload.github.com/spotDL/spotdl-v4/zip/master
     / 925.3 kB 4.1 MB/s 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting rich<12.0.0,>=11.1.0
  Downloading rich-11.2.0-py3-none-any.whl (217 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 217.3/217.3 KB 2.2 MB/s eta 0:00:00
Requirement already satisfied: spotipy<3.0.0,>=2.19.0 in /usr/local/lib/python3.8/site-packages (from spotdl==4.0.0a0) (2.19.0)
Collecting ytmusicapi<0.21.0,>=0.20.0
  Downloading ytmusicapi-0.20.0-py3-none-any.whl (47 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.6/47.6 KB 1.0 MB/s eta 0:00:00
Collecting rapidfuzz<2.0.0,>=1.9.1
  Downloading rapidfuzz-1.9.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (892 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 892.8/892.8 KB 10.0 MB/s eta 0:00:00
Requirement already satisfied: beautifulsoup4<5.0.0,>=4.10.0 in /usr/local/lib/python3.8/site-packages (from spotdl==4.0.0a0) (4.10.0)
Requirement already satisfied: yt-dlp<2023.0.0,>=2022.1.21 in /usr/local/lib/python3.8/site-packages (from spotdl==4.0.0a0) (2022.3.8.2)
Requirement already satisfied: mutagen<2.0.0,>=1.45.1 in /usr/lib/python3.8/site-packages (from spotdl==4.0.0a0) (1.45.1)
Requirement already satisfied: requests<3.0.0,>=2.27.1 in /usr/lib/python3.8/site-packages (from spotdl==4.0.0a0) (2.27.1)
Collecting pytube<12.0.0,>=11.0.2
  Downloading pytube-11.0.2-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.2/56.2 KB 1.0 MB/s eta 0:00:00
Collecting python-slugify<7.0.0,>=6.1.1
  Downloading python_slugify-6.1.1-py2.py3-none-any.whl (9.1 kB)
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.8/site-packages (from beautifulsoup4<5.0.0,>=4.10.0->spotdl==4.0.0a0) (2.3.1)
Collecting text-unidecode>=1.3
  Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.2/78.2 KB 1.6 MB/s eta 0:00:00
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3.8/site-packages (from requests<3.0.0,>=2.27.1->spotdl==4.0.0a0) (2021.10.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.8/site-packages (from requests<3.0.0,>=2.27.1->spotdl==4.0.0a0) (1.26.7)
Requirement already satisfied: charset_normalizer~=2.0.0 in /usr/lib/python3.8/site-packages (from requests<3.0.0,>=2.27.1->spotdl==4.0.0a0) (2.0.12)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.8/site-packages (from requests<3.0.0,>=2.27.1->spotdl==4.0.0a0) (3.3)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /usr/local/lib/python3.8/site-packages (from rich<12.0.0,>=11.1.0->spotdl==4.0.0a0) (0.9.1)
Requirement already satisfied: colorama<0.5.0,>=0.4.0 in /usr/lib/python3.8/site-packages (from rich<12.0.0,>=11.1.0->spotdl==4.0.0a0) (0.4.4)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /usr/local/lib/python3.8/site-packages (from rich<12.0.0,>=11.1.0->spotdl==4.0.0a0) (2.11.2)
Requirement already satisfied: six>=1.15.0 in /usr/lib/python3.8/site-packages (from spotipy<3.0.0,>=2.19.0->spotdl==4.0.0a0) (1.16.0)
Requirement already satisfied: brotli in /usr/local/lib64/python3.8/site-packages (from yt-dlp<2023.0.0,>=2022.1.21->spotdl==4.0.0a0) (1.0.9)
Requirement already satisfied: websockets in /usr/local/lib64/python3.8/site-packages (from yt-dlp<2023.0.0,>=2022.1.21->spotdl==4.0.0a0) (10.2)
Requirement already satisfied: pycryptodomex in /usr/local/lib64/python3.8/site-packages (from yt-dlp<2023.0.0,>=2022.1.21->spotdl==4.0.0a0) (3.14.1)
Building wheels for collected packages: spotdl
  Building wheel for spotdl (pyproject.toml) ... done
  Created wheel for spotdl: filename=spotdl-4.0.0a0-py3-none-any.whl size=54207 sha256=99e64ca05548cdd9733e1b10d5e278f915fd4884631697c38461ac4fff7d9209
  Stored in directory: /tmp/pip-ephem-wheel-cache-tfpdkvzu/wheels/58/9c/ff/55e1023a3638abe9719699055060ef01412a910ac079d4c78a
Successfully built spotdl
Installing collected packages: text-unidecode, rich, rapidfuzz, pytube, python-slugify, ytmusicapi, spotdl
  WARNING: The script pytube is installed in '/home/la/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script spotdl is installed in '/home/la/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed python-slugify-6.1.1 pytube-11.0.2 rapidfuzz-1.9.1 rich-11.2.0 spotdl-4.0.0a0 text-unidecode-1.3 ytmusicapi-0.20.0
la@localhost:~>

Now when I try to download something from spotify all I get is:

la@localhost:~> spotdl https://open.spotify.com/album/2lGfBWhUlJN4Xm2vzoDuan
If 'spotdl' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf spotdl
la@localhost:~> 

At least with v3.9.3 I could download, even though I could not echo the text on the terminal [see what I was typing] If spotdl 3.9.3 worked [mainly], why would spotdl v4. give me this error?

xnetcat commented 2 years ago

WARNING: The script spotdl is installed in '/home/la/.local/bin' which is not on PATH.

Add ~/.local/bin to PATH or run pip install as root user

LaGrabow commented 2 years ago

Thank you Jakub. I did as suggested [add .local/bin to PATH.

@.:~> echo $PATH /home/la/.local/bin:/home/la/bin:/usr/local/bin:/usr/bin:/bin:/snap/bin @.:~>

I am now getting this message as I try to download. Am I supposed to be putting something different in my cli or maybe adding something?

@.***:~> spotdl https://open.spotify.com/album/1gEsvKk6TlhKXWMmDUukZi

usage: spotdl [-h] [--audio {youtube,youtube-music}] [--lyrics {genius,musixmatch,azlyrics}] [--config] [--search-query SEARCH_QUERY] [--dont-filter-results] [--user-auth] [--client-id CLIENT_ID] [--client-secret CLIENT_SECRET] [--cache-path CACHE_PATH] [--no-cache] [--cookie-file COOKIE_FILE] [--ffmpeg FFMPEG] [--threads THREADS] [--variable-bitrate {0,1,2,3,4,5,6,7,8,9}] [--constant-bitrate {8k,16k,24k,32k,40k,48k,64k,80k,96k,112k,128k,160k,192k,224k,256k,320k}] [--ffmpeg-args FFMPEG_ARGS] [--format {mp3,flac,ogg,opus,m4a}] [--save-file SAVE_FILE] [--output OUTPUT] [--m3u M3U] [--overwrite {skip,force}] [--restrict] [--print-errors] [--sponsor-block] [--log-level {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET}] [--simple-tui] [--headless] [--download-ffmpeg] [--generate-config] [--check-for-updates] [--version] {download,save,preload,web,sync} query [query ...] spotdl: error: argument operation: invalid choice: ' https://open.spotify.com/album/1gEsvKk6TlhKXWMmDUukZi' (ch oose from 'download', 'save', 'preload', 'web', 'sync') @.***:~>

On Mon, Apr 4, 2022 at 3:12 PM Jakub Kot @.***> wrote:

WARNING: The script spotdl is installed in '/home/la/.local/bin' which is not on PATH.

Add ~/.local/bin to PATH or run pip install as root user

— Reply to this email directly, view it on GitHub https://github.com/spotDL/spotify-downloader/issues/1494#issuecomment-1087916248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANEYIIY2EVDRJ2SAKVIFSR3VDM5JVANCNFSM5SEBMTIQ . You are receiving this because you authored the thread.Message ID: @.***>

LaGrabow commented 2 years ago

My apologies for bothering you Jakub. I answered my own query. The correct cli is:

@.**:~> spotdl download* https://open.spotify.com/album/6bLfnHhon1uMjBgvBUm6v2

or at least that worked for me.

On Sat, Apr 9, 2022 at 1:00 PM LAB @.***> wrote:

Thank you Jakub. I did as suggested [add .local/bin to PATH.

@.:~> echo $PATH /home/la/.local/bin:/home/la/bin:/usr/local/bin:/usr/bin:/bin:/snap/bin @.:~>

I am now getting this message as I try to download. Am I supposed to be putting something different in my cli or maybe adding something?

@.***:~> spotdl

https://open.spotify.com/album/1gEsvKk6TlhKXWMmDUukZi usage: spotdl [-h] [--audio {youtube,youtube-music}] [--lyrics {genius,musixmatch,azlyrics}] [--config] [--search-query SEARCH_QUERY] [--dont-filter-results] [--user-auth] [--client-id CLIENT_ID] [--client-secret CLIENT_SECRET] [--cache-path CACHE_PATH] [--no-cache] [--cookie-file COOKIE_FILE] [--ffmpeg FFMPEG] [--threads THREADS] [--variable-bitrate {0,1,2,3,4,5,6,7,8,9}] [--constant-bitrate {8k,16k,24k,32k,40k,48k,64k,80k,96k,112k,128k,160k,192k,224k,256k,320k}] [--ffmpeg-args FFMPEG_ARGS] [--format {mp3,flac,ogg,opus,m4a}] [--save-file SAVE_FILE] [--output OUTPUT] [--m3u M3U] [--overwrite {skip,force}] [--restrict] [--print-errors] [--sponsor-block] [--log-level {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET}] [--simple-tui] [--headless] [--download-ffmpeg] [--generate-config] [--check-for-updates] [--version] {download,save,preload,web,sync} query [query ...] spotdl: error: argument operation: invalid choice: ' https://open.spotify.com/album/1gEsvKk6TlhKXWMmDUukZi' (ch oose from 'download', 'save', 'preload', 'web', 'sync') @.***:~>

On Mon, Apr 4, 2022 at 3:12 PM Jakub Kot @.***> wrote:

WARNING: The script spotdl is installed in '/home/la/.local/bin' which is not on PATH.

Add ~/.local/bin to PATH or run pip install as root user

— Reply to this email directly, view it on GitHub https://github.com/spotDL/spotify-downloader/issues/1494#issuecomment-1087916248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANEYIIY2EVDRJ2SAKVIFSR3VDM5JVANCNFSM5SEBMTIQ . You are receiving this because you authored the thread.Message ID: @.***>