找不到隧道错误 Pyngrok streamlit collab

Tunnel not found error Pyngrok streamlit collab

我正在 streamlit 中开发 ui 并使用 Colab 的 pyngrok。一切正常,直到几天前隧道未发现错误开始发生。我正在使用下面的代码。我也升级了 pyngrok 并尝试过,但同样的问题仍然存在。整个 UI building 和 Colab pyngrok 似乎是最方便的学习方式。但是现在如果任何人也可以建议任何其他方法或者做错了什么,这将停止工作,那就太好了


!pip install streamlit
!pip install pyngrok==4.1.1
import streamlit as st
from pyngrok import ngrok
# !ngrok authtoken (mykey)

# writefile app.py

def main():
  # app body
  pass

if __name__=='__main__':
  main()

!streamlit run app.py &>/dev/null&
public_url = ngrok.connect(port='8501')
public_url


#the log is also attached below after running above code which runs without errors as can be seen
#output below
2021-01-30 09:30:44.197 INFO    pyngrok.process: ngrok process starting: 1106
2021-01-30 09:30:44.218 INFO    pyngrok.process: t=2021-01-30T09:30:44+0000 lvl=info msg="no configuration paths supplied"

2021-01-30 09:30:44.220 INFO    pyngrok.process: t=2021-01-30T09:30:44+0000 lvl=info msg="using configuration at default config path" path=/root/.ngrok2/ngrok.yml

2021-01-30 09:30:44.224 INFO    pyngrok.process: t=2021-01-30T09:30:44+0000 lvl=info msg="open config file" path=/root/.ngrok2/ngrok.yml err=nil

2021-01-30 09:30:44.227 INFO    pyngrok.process: t=2021-01-30T09:30:44+0000 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040

2021-01-30 09:30:45.021 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg="tunnel session started" obj=tunnels.session

2021-01-30 09:30:45.026 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg="client session established" obj=csess id=a37f21d64392

2021-01-30 09:30:45.031 INFO    pyngrok.process: ngrok process has started: http://127.0.0.1:4040
2021-01-30 09:30:45.044 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg=start pg=/api/tunnels id=39c5cfa99a0ab7d7

2021-01-30 09:30:45.051 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg=end pg=/api/tunnels id=39c5cfa99a0ab7d7 status=200 dur=386.416µs

2021-01-30 09:30:45.057 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg=start pg=/api/tunnels id=9e57507bfe0794a8

2021-01-30 09:30:45.059 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg=end pg=/api/tunnels id=9e57507bfe0794a8 status=200 dur=159.931µs

2021-01-30 09:30:45.063 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg=start pg=/api/tunnels id=121fc98244651186

2021-01-30 09:30:45.418 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg="started tunnel" obj=tunnels name="http-8501-b9a57eaf-a9ac-4dd9-be80-7b1a5e4af344 (http)" addr=http://localhost:8501 url=http://c25e18c565f2.ngrok.io

2021-01-30 09:30:45.422 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg="started tunnel" obj=tunnels name=http-8501-b9a57eaf-a9ac-4dd9-be80-7b1a5e4af344 addr=http://localhost:8501 url=https://c25e18c565f2.ngrok.io

2021-01-30 09:30:45.428 INFO    pyngrok.process: t=2021-01-30T09:30:45+0000 lvl=info msg=end pg=/api/tunnels id=121fc98244651186 status=201 dur=374.833924ms

http://c25e18c565f2.ngrok.io

错误:

我是 pyngrok 的开发者,我想与您联系,让您知道我已经在我们的问题跟踪器上看到有关此弹出窗口的报告,这里有几个,在 Colab 的问题跟踪器上,上周很多。我联系了 ngrok,因为这似乎是问题所在,他们刚刚回复了我。他们确认他们最近无意中开始阻止与 Colab 的连接,现在他们已经解决了这个问题。我自己也测试了一遍,果然修好了!