从烧瓶中导入请求和会话的问题

发布于 2025-01-26 16:58:56 字数 291 浏览 1 评论 0 原文

VS代码未识别来自烧瓶的导入请求和会话。当我编写代码时,IT将请求和会话初始化为变量。

我已经卸载并重新安装了烧瓶2.1 。我正在为IDE使用VS代码,并运行MacBook Pro M1。为什么我有这个问题?

VS Code is not recognizing import requests and session from flask. When I write the code it initializes request and session as variables.

I have pip uninstalled and reinstalled flask 2.1. I’m using VS Code for IDE and running MacBook Pro M1. Why do I have this problem?

Picture of the code

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

匿名。 2025-02-02 16:58:56

在集成的终端中,通过输入运行该应用程序,该应用程序运行烧瓶开发服务器。默认情况下,开发服务器寻找。运行烧瓶时,您应该看到类似于以下内容的输出: python -m flask runapp.py

以打开默认浏览器到渲染页面,ctrl+ctrl+单击终端中的URL。 http://127.0.0.1:5000/

您可以参考 vscode中的烧瓶的更多详细信息

In the Integrated Terminal, run the app by entering , which runs the Flask development server. The development server looks for by default. When you run Flask, you should see output similar to the following:python -m flask runapp.py

To open your default browser to the rendered page, Ctrl+click the URL in the terminal.http://127.0.0.1:5000/

You can refer to the document of flask in vscode for more details

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文