Mesop 蟒蛇。获取用户错误:路径/未注册

问题描述 投票:0回答:1

错误讯息

使用 mesop 示例代码出现此错误。为什么?

import mesop as me
import mesop.labs as mel


@me.page(
    security_policy=me.SecurityPolicy(
    allowed_iframe_parents=["https://google.github.io"]
    ),
    path="/text_to_text",
    title="Text to Text Example",
)
def app():
    mel.text_to_text(
    upper_case_stream,
    title="Text to Text Example",
    transform_mode="replace"
  )

def upper_case_stream(s: str):
    return "Echo: " + s

我猜测服务器运行在 http://localhost:32123 上它应该在的位置 http://localhost:32123/text_to_text。 我相信这部分: 路径=“/text_to_text”,

就是添加/text_to_text来完成链接:http://localhost:32123。但错误发生了。

python web-applications
1个回答
0
投票

你有没有搞清楚这件事的真相?将路径设置为 / 可以使其正常工作,但这并不是所有示例所显示的。

© www.soinside.com 2019 - 2024. All rights reserved.