[GH-ISSUE #611] Spotipy/Flask #363

Closed
opened 2026-02-27 23:22:13 +03:00 by kerem · 9 comments
Owner

Originally created by @Sticks111 on GitHub (Nov 15, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/611

I hope all is well. I am currently self-studying Python and am working on a Spotify web app using Spotipy, but am having a bit of trouble setting everything up. I was wondering if you might have any tips on how to set up app.py with Spotipy so that it includes @app.route('/'), requests.get, and return render_template, in a way where Flask Run can run successfully? Do Spotipy and Flask work well together? I am a beginner so would appreciate any advice. Thank you!

Originally created by @Sticks111 on GitHub (Nov 15, 2020). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/611 I hope all is well. I am currently self-studying Python and am working on a Spotify web app using Spotipy, but am having a bit of trouble setting everything up. I was wondering if you might have any tips on how to set up app.py with Spotipy so that it includes @app.route('/'), requests.get, and return render_template, in a way where Flask Run can run successfully? Do Spotipy and Flask work well together? I am a beginner so would appreciate any advice. Thank you!
kerem 2026-02-27 23:22:13 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@Peter-Schorn commented on GitHub (Nov 16, 2020):

See https://github.com/plamere/spotipy/blob/master/examples/app.py

<!-- gh-comment-id:727738359 --> @Peter-Schorn commented on GitHub (Nov 16, 2020): See https://github.com/plamere/spotipy/blob/master/examples/app.py
Author
Owner

@Sticks111 commented on GitHub (Nov 16, 2020):

Thank you Peter! Checking out the link right now. Much appreciated

<!-- gh-comment-id:728052410 --> @Sticks111 commented on GitHub (Nov 16, 2020): Thank you Peter! Checking out the link right now. Much appreciated
Author
Owner

@Sticks111 commented on GitHub (Nov 21, 2020):

Hi Peter,

I've checked out the document and everything has been going smoothly except upon clicking http://127.0.0.1:8888/ or http://127.0.0.1:8080/ subsequent to python3 -m flask run --port=8888 or python3 -m flask run --port=8080, I get a "This site can’t be reached 127.0.0.1 refused to connect" message on Chrome. Would appreciate any thoughts on how this issue can be resolved.

Thanks so much

<!-- gh-comment-id:731607870 --> @Sticks111 commented on GitHub (Nov 21, 2020): Hi Peter, I've checked out the document and everything has been going smoothly except upon clicking http://127.0.0.1:8888/ or http://127.0.0.1:8080/ subsequent to python3 -m flask run --port=8888 or python3 -m flask run --port=8080, I get a "This site can’t be reached 127.0.0.1 refused to connect" message on Chrome. Would appreciate any thoughts on how this issue can be resolved. Thanks so much
Author
Owner

@Peter-Schorn commented on GitHub (Nov 21, 2020):

@Sticks111 Sorry, but I've actually never used flask. I just knew that example existed. ask @stephanebruckert .

<!-- gh-comment-id:731613464 --> @Peter-Schorn commented on GitHub (Nov 21, 2020): @Sticks111 Sorry, but I've actually never used flask. I just knew that example existed. ask @stephanebruckert .
Author
Owner

@Sticks111 commented on GitHub (Nov 21, 2020):

Thanks, will do!

<!-- gh-comment-id:731615259 --> @Sticks111 commented on GitHub (Nov 21, 2020): Thanks, will do!
Author
Owner

@stephanebruckert commented on GitHub (Nov 21, 2020):

@Sticks111 check what's outputted in the console, it should give you the correct URL for the flask app. In my case it is http://127.0.0.1:5000/, and not 8080 or 8888

<!-- gh-comment-id:731646295 --> @stephanebruckert commented on GitHub (Nov 21, 2020): @Sticks111 check what's outputted in the console, it should give you the correct URL for the flask app. In my case it is http://127.0.0.1:5000/, and not 8080 or 8888
Author
Owner

@Sticks111 commented on GitHub (Nov 21, 2020):

Hi @stephanebruckert

Indeed, I just resubmitted the steps and what I see in my console is the output: Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) However when I click on it, I am led to this message:

This site can’t be reached 127.0.0.1 refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

I tried adjusting my internet settings with the exception of firewalls; should I be removing any firewalls?

Thank you

<!-- gh-comment-id:731652205 --> @Sticks111 commented on GitHub (Nov 21, 2020): Hi @stephanebruckert Indeed, I just resubmitted the steps and what I see in my console is the output: Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) However when I click on it, I am led to this message: This site can’t be reached 127.0.0.1 refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED I tried adjusting my internet settings with the exception of firewalls; should I be removing any firewalls? Thank you
Author
Owner

@Sticks111 commented on GitHub (Nov 22, 2020):

Looks like there has been a breakthrough; am now on the Sign In page after experimenting in the console and adding two redirect URIs in my Spotify settings. May have to come back later with a quick question but am progressing
Thanks!

<!-- gh-comment-id:731843332 --> @Sticks111 commented on GitHub (Nov 22, 2020): Looks like there has been a breakthrough; am now on the Sign In page after experimenting in the console and adding two redirect URIs in my Spotify settings. May have to come back later with a quick question but am progressing Thanks!
Author
Owner

@stephanebruckert commented on GitHub (Jan 23, 2021):

@Sticks111 glad you're progressing. I'm closing this for now but feel free to reopen it with further questions

<!-- gh-comment-id:766144249 --> @stephanebruckert commented on GitHub (Jan 23, 2021): @Sticks111 glad you're progressing. I'm closing this for now but feel free to reopen it with further questions
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#363
No description provided.