1

Need help flask-ngrok in colab not working anymore ?

!pip install flask-ngrok -q

from flask_ngrok import run_with_ngrok
from flask import Flask

app = Flask(__name__)
run_with_ngrok(app)

@app.route("/")
def home():
    return "hello api"
  
app.run()

output

Tunnel xxxxxxxxxxxx.ngrok.io not found

Thank You

pp7sec
  • 75
  • 4
  • Could this be a new constraint of Colab, perhaps? I've seen a few questions on here about this in the last week, and nothing has changed. Everything works with `pyngrok` from a local machine, and there are no new changes, so perhaps Colab or `ngrok` itself recently started blocking these connections. – alexdlaird Jan 30 '21 at 18:50
  • The integration examples [here](https://pyngrok.readthedocs.io/en/latest/integrations.html#colab-http-example) that definitely used to work now give the same error. – alexdlaird Jan 30 '21 at 18:51
  • It's also worth noting if you add something like `urllib.request.urlopen(public_url).read()` to the Colab notebook itself, the tunnel is found and the request gets through. Feels very much like an access issue in Colab. – alexdlaird Feb 01 '21 at 22:54

0 Answers0