gpt4 book ai didi

python - 隧道未找到错误 Pyngrok streamlit 协作

转载 作者:行者123 更新时间:2023-12-03 14:21:07 27 4
gpt4 key购买 nike

我正在 streamlit 中开发用户界面并使用 pyngrok来自 Colab。一切正常,直到几天前隧道未找到错误开始发生。我正在使用下面的代码。我也升级了pyngrok并尝试过,但同样的问题仍然存在。整个 UI 建筑和 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
错误:
enter image description here

最佳答案

我是pyngrok的开发者,我想与您联系,让您知道,上周我在我们的问题跟踪器、此处、Colab 的问题跟踪器等上多次看到有关此问题的报告。我联系了 ngrok ,因为这似乎是问题所在,他们刚刚回复我。他们确认他们最近无意中开始阻止与 Colab 的连接,现在他们已经解决了这个问题。我自己也刚刚对此进行了再次测试,果然,它已修复!

关于python - 隧道未找到错误 Pyngrok streamlit 协作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65966425/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com