gstaff / flask-ngrok

A simple way to demo Flask apps from your machine.
Other
138 stars 58 forks source link

Not working in colab now. [ConnectionRefusedError: [Errno 111] Connection refused] #36

Open alloc7260 opened 1 year ago

alloc7260 commented 1 year ago

ConnectionRefusedError: [Errno 111] Connection refused when running sample notebook.

densaiko commented 1 year ago

same in here, is there anyone can solve this?

roeehub commented 1 year ago

I'm on Colab, the example notebook is not working. I'm getting: ImportError: cannot import name 'Markup' from 'jinja2' (/usr/local/lib/python3.10/dist-packages/jinja2/init.py)

It seems to be a result of using an older version of Flask (0.12.2) as part of a workaround

acrigney commented 9 months ago

Yes ngrok is not working in colab now from flask_ngrok import run_with_ngrok from flask import Flask, escape, request

app = Flask(name) app.secret_key = '????' run_with_ngrok(app) @app.route('/') def hello(): name = request.args.get("name", "World")

ImportError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/flask/helpers.py in 23 try: ---> 24 from werkzeug.urls import url_quote 25 except ImportError:

ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.10/dist-packages/werkzeug/urls.py)

During handling of the above exception, another exception occurred:

ModuleNotFoundError Traceback (most recent call last) 3 frames /usr/local/lib/python3.10/dist-packages/flask/helpers.py in 24 from werkzeug.urls import url_quote 25 except ImportError: ---> 26 from urlparse import quote as url_quote 27 28 from werkzeug.datastructures import Headers, Range

ModuleNotFoundError: No module named 'urlparse'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below. return f'Hello, {escape(name)}!'

if name == "main": app.run(debug=True)

But !pip install urlparse does not fix this

Junime commented 7 months ago

i think they limited the service this will be not working from now on i guess sad to see this go really

alloc7260 commented 7 months ago

Hey, all you can use this notebook insted of this library