spotify2tidal / spotify_to_tidal

A command line tool for importing your Spotify playlists into Tidal
GNU Affero General Public License v3.0
241 stars 44 forks source link

No URL for authorization? #23

Closed bibi-b closed 2 months ago

bibi-b commented 1 year ago

Hi there,

seems that I am doing something wrong. On a headless Ubuntu 20 I run:

python3 sync.py

but nothing happens. I have to abort with ctrl-c to get back to the command line, where it then says:

Traceback (most recent call last): File "/home/meiko/spotify_to_tidal/sync.py", line 297, in spotify_session = open_spotify_session(config['spotify']) File "/home/meiko/spotify_to_tidal/auth.py", line 16, in open_spotify_session credentials_manager.get_access_token(as_dict=False) File "/home/meiko/miniconda3/lib/python3.10/site-packages/spotipy/oauth2.py", line 535, in get_access_token "code": code or self.get_auth_response(), File "/home/meiko/miniconda3/lib/python3.10/site-packages/spotipy/oauth2.py", line 490, in get_auth_response return self._get_auth_response_local_server(redirect_port) File "/home/meiko/miniconda3/lib/python3.10/site-packages/spotipy/oauth2.py", line 459, in _get_auth_response_local_server server.handle_request() File "/home/meiko/miniconda3/lib/python3.10/socketserver.py", line 294, in handle_request ready = selector.select(timeout) File "/home/meiko/miniconda3/lib/python3.10/selectors.py", line 416, in select fd_event_list = self._selector.poll(timeout) KeyboardInterrupt

If I understand everything right, I should have get an URL for authorization, haven't I?

Thanks meiko

timrae commented 1 year ago

How long did you wait before aborting?

On Tue, 6 Jun 2023, 4:35 am bibi-b, @.***> wrote:

Hi there,

seems that I am doing something wrong. On a headless Ubuntu 20 I run:

python3 sync.py

but nothing happens. I have to abort with ctrl-c to get back to the command line, where it then says:

Traceback (most recent call last): File "/home/meiko/spotify_to_tidal/sync.py", line 297, in spotify_session = open_spotify_session(config['spotify']) File "/home/meiko/spotify_to_tidal/auth.py", line 16, in open_spotify_session credentials_manager.get_access_token(as_dict=False) File "/home/meiko/miniconda3/lib/python3.10/site-packages/spotipy/oauth2.py", line 535, in get_access_token "code": code or self.get_auth_response(), File "/home/meiko/miniconda3/lib/python3.10/site-packages/spotipy/oauth2.py", line 490, in get_auth_response return self._get_auth_response_local_server(redirect_port) File "/home/meiko/miniconda3/lib/python3.10/site-packages/spotipy/oauth2.py", line 459, in _get_auth_response_local_server server.handle_request() File "/home/meiko/miniconda3/lib/python3.10/socketserver.py", line 294, in handle_request ready = selector.select(timeout) File "/home/meiko/miniconda3/lib/python3.10/selectors.py", line 416, in select fd_event_list = self._selector.poll(timeout) KeyboardInterrupt

If I understand everything right, I should have get an URL for authorization, haven't I?

Thanks meiko

— Reply to this email directly, view it on GitHub https://github.com/timrae/spotify_to_tidal/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVQBYUG3USIFYX7PRW4NF3XJYDGPANCNFSM6AAAAAAY3HALR4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

bibi-b commented 1 year ago

@timrae About 30 min.

timrae commented 1 year ago

I see... Do you have X11 running? Usually it'll open up a browser window where you do the oauth authentication.

bibi-b commented 1 year ago

No, as it is an headless server I want to have it "lean". Any chance to get the URL in the command line?

timrae commented 1 year ago

I'd say the easiest way would be to use X11 forwarding to your local computer. I've never tried to run it on a headless server, so can't offer any support on this.

bibi-b commented 1 year ago

Okay, thank you. I'll try this.