Deploying NBA app in heroku, error HTTPSConnectionPool, Read Timed out

Hello all!

Here is my app based on the great Data Professor:

The issue is that the shot chart that should have displayed doesn’t work and shows this error:

In local level all works fine so, what can I do to deploy it correctly?

This is the correct output:

You can find the code here:

It’s my first time working with streamlit-heroku, so all help would be welcome! Thank you!

Hi @pabsalmeron, welcome to the Streamlit community!

If your app works locally, but doesn’t work on Heroku, it could be the case that the URL you are pinging has Heroku blocked. Is this an authenticated API or are you just scraping the data?

Thank you for your answer @randyzwitch !

I think that’s the problem, I’m not sure but nba_api could probably be unauthorized and does scrapping to nba website. In that case, is there any alternative to get a correct output?

I parched this doing it manually (creating the images, upload to git…) but it’s really dirty.

Thank you again!

Someone else is reporting a similar error to yours, so hard to say what the issue might be:

Since I’m not the maintainer of this package, I don’t really have any alternatives to suggest in terms of an alternate package. You might try and deploy on Streamlit sharing to see if it truly is a banned IP address for Heroku.


I’m waiting for an invite to try in Streamlit Sharing. Anyway, very kind for your time @randyzwitch , thank you!

I’ve already a streamlit sharing account, and I get this error:

No module named ‘matplotlib’

I’ve got matplotlib inside the requeriments.txt file, so… I don’t understand this error.

Maybe a stupid question, but do you simply have a typo in your requirements.txt filename?

You’re absolutely right! This is embarrasing hehe, thank you @cwerner !

Matplotlib error is fixed, but I’ve the first one again:

HTTPSConnectionPool(host=‘’, port=443): Read timed out. (read timeout=30).

It could be anything about streamlit config?