Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastapi mount endpoint 404 #391

Open
wanghaisheng opened this issue May 11, 2022 · 4 comments
Open

fastapi mount endpoint 404 #391

wanghaisheng opened this issue May 11, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@wanghaisheng
Copy link

Note: For inquiries while using PyWebIO or questions that might be helpful to others, please consider moving to Discussions for posting.

BUG Description

A clear and concise description of what the bug is and how to reproduce it.

If the browser console reports an error or the script throws an exception, please also report them.

Environment Information

  • OS and Version:
  • Browser and Version:
  • Python Version: Use python3 --version to view
  • PyWebIO Version: Use python3 -c "import pywebio;print(pywebio.__version__)" to view

main.py

@config(theme="minty", title=SEO_TITLE, description=SEO_DESCRIPTION)
def index() -> None:
app.mount("/", FastAPI(routes=webio_routes(index)))
app.mount("/feedback/", FastAPI(routes=webio_routes(feedback)))

feedback.py

@seo(SEO_TITLE, SEO_DESCRIPTION)
@config(theme="minty", js_file=[GA_JS_FILE], js_code=GA_JS_CODE)
def feedback() -> None:
    run_js(LANDING_PAGE_HEADING)
    run_js(FOOTER)

endpoint / is ok
endpoint /feedback is 404

@wanghaisheng wanghaisheng added the bug Something isn't working label May 11, 2022
@wanghaisheng
Copy link
Author

@wang0618 can u help

@wang0618
Copy link
Member

try to open the /feedback/ url ?

@wanghaisheng
Copy link
Author

这种我都试过了
Code_BPplwjsGHw

@wanghaisheng
Copy link
Author

可能存在的问题还是方法定义上是不是冲突了?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants