问题描述
我正在使用 streamlit
开发一个ui,并使用Colab的 pyngrok
.一切正常,直到几天前隧道未发现错误开始发生.我正在使用下面的代码.我还升级了 pyngrok
并尝试过,但仍然存在相同的问题.对于整个用户界面构建来说,这是相当陌生的,而Colab pyngrok
似乎是最方便的学习方法.但是现在,如果有人也可以建议其他任何方法,或者做错了什么事,那将停止工作
I was developing an ui in streamlit
and using pyngrok
from Colab. everything was working fine till few days earlier the tunnel not found error started occurring. I am using below code. I have also upgraded pyngrok
and tried but same problem persisted. Fairly new to the whole UI building and Colab pyngrok
seemed most convenient way to learn. But now that this stopped working if anyone can suggest any other methods too or what am doing wrong that would be great
!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的连接,现在他们已解决此问题.我也自己再次测试了这个,当然,它已经修复了!
I am the developer of pyngrok
, and I wanted to reach out to let you know that I've seen reports of this pop up on our issue tracker, several on here, on Colab's issue tracker, etc. a lot in the last week. I reached out to ngrok
, as that appeared to be where the issue was, and they just got back to me. They confirmed that they had inadvertently started blocking connections to Colab recently, and they have now fixed this. I just tested this again myself as well, and sure enough, it's fixed!
这篇关于找不到隧道错误Pyngrok streamlit协作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!