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

No URL for authorization? #23

Closed
bibi-b opened this issue Jun 5, 2023 · 6 comments
Closed

No URL for authorization? #23

bibi-b opened this issue Jun 5, 2023 · 6 comments

Comments

@bibi-b
Copy link

bibi-b commented Jun 5, 2023

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
Copy link
Collaborator

timrae commented Jun 5, 2023 via email

@bibi-b
Copy link
Author

bibi-b commented Jun 6, 2023

@timrae About 30 min.

@timrae
Copy link
Collaborator

timrae commented Jun 6, 2023

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

@bibi-b
Copy link
Author

bibi-b commented Jun 6, 2023

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

@timrae
Copy link
Collaborator

timrae commented Jun 6, 2023

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
Copy link
Author

bibi-b commented Jun 6, 2023

Okay, thank you. I'll try this.

@timrae timrae closed this as completed Apr 28, 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

2 participants