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

Spotify authentication doesn't work #77

Closed
CaioMussatto opened this issue Oct 22, 2023 · 2 comments
Closed

Spotify authentication doesn't work #77

CaioMussatto opened this issue Oct 22, 2023 · 2 comments

Comments

@CaioMussatto
Copy link

Hi, I’m trying to run the setup, but keep giving me this message error
Some details: Python version (Python 3.10.9), Pip version (22.3.1), Windows 10 (10.0.19045)
The redirect URI in my app in Spotify's developer dashboard is set as: http://localhost
The message error:

spotify_to_ytmusic setup
Traceback (most recent call last):
File "C:\Users\caiom\AppData\Local\miniconda3\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\caiom\AppData\Local\miniconda3\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\caiom\AppData\Local\miniconda3\Scripts\spotify_to_ytmusic.exe_main
.py", line 4, in
File "C:\Users\caiom\AppData\Local\miniconda3\lib\site-packages\spotify_to_ytmusic\main.py", line 4, in
from spotify_to_ytmusic import controllers
File "C:\Users\caiom\AppData\Local\miniconda3\lib\site-packages\spotify_to_ytmusic\controllers.py", line 6, in
from spotify_to_ytmusic.setup import setup as setup_func
File "C:\Users\caiom\AppData\Local\miniconda3\lib\site-packages\spotify_to_ytmusic\setup.py", line 9, in
from spotify_to_ytmusic.settings import DEFAULT_PATH, EXAMPLE_PATH, Settings
File "C:\Users\caiom\AppData\Local\miniconda3\lib\site-packages\spotify_to_ytmusic\settings.py", line 10, in
platformdirs.user_cache_dir(appname="spotify_to_ytmusic", appauthor=False, ensure_exists=True)
TypeError: user_cache_dir() got an unexpected keyword argument 'ensure_exists'

@keithzg
Copy link

keithzg commented Nov 2, 2023

Getting the same error merely running spotify_to_ytmusic setup on Linux (Kubuntu 23.04, Python 3.11.4). I don't even think it's the Spotify auth that's not working, something would seem to be failing before we get to to that point?

Installing version 0.2.0 instead gets me to

Choose which API to set up
(1) Spotify
(2) YouTube
(3) both

which seems to me to confirm that this is failing before the point where Spotify is involved in any way.

It's strange to me that platformdirs.user_cache_dir() is throwing the complaint about ensure_exists since that sure does seem to be a valid option for that function.

I see platformdirs on my system is at version 3.0.0 (provided by the python3-platformdirs package from the distro repos). Fascinatingly, turning against the true faith and removing the distro package and instead installing platformdirs via pip3 works fine, and this is true _regardless of whether I install:

  • platformdirs at version 3.11.0 under my user via pip3
  • platformdirs at version 3.0.0 under my user via pip3
  • platformdirs at version 3.0.0 system-wide via sudo pip3

So the problem wouldn't seem to be the version of platformdirs, but rather my distro package versus any pip3-installed PyPi package. But it's strange that a distro package vs pypi package would matter like this considering the problem was originally reported here on Windows! Not knowing quite why this is going wrong though I dunno if it's actually a different problem I'm having, or if it's a different expression of some same underlying problem.

Anyways, I know personally I'm very tempted to believe this is a problem with platformdirs rather than with spotify_to_ytmusic.

@sigma67
Copy link
Owner

sigma67 commented Nov 2, 2023

ensure_exists is only a thing since platformdirs>=3.2 - this means that the dependency lower bound is wrong. My bad

@keithzg there must have been some environment issue on your end when you used 3.0, because that really shouldn't work

sigma67 added a commit that referenced this issue Nov 2, 2023
@sigma67 sigma67 closed this as completed Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants