Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Errors and warning in Flask
#1
Hi I want to create a website using Flask but I am not a developer, I am from networking line, I have created the website with the help of chat GPT, but when I am trying to run it, its giving errors. I am atteching screenshot, please help.

Attached Files

Thumbnail(s)
   
Reply
#2
You now in a virtual environment look down in right corner 3.12.4('.venv': venv)
This mean that you most first install Flask and Flask-SQLAlchemy into this environment and then load VS Code again.
Example.
G:\div_code\foobar λ python -m venv venv G:\div_code\foobar λ cd venv G:\div_code\foobar\venv λ G:\div_code\foobar\venv\Scripts\activate.bat G:\div_code\foobar\venv (venv) λ pip list Package Version ------- ------- pip 24.0
So now i make the environment the same as you most have done,and can install to it.
G:\div_code\foobar\venv (venv) λ pip install flask Collecting flask ..... Successfully installed Jinja2-3.1.4 MarkupSafe-2.1.5 Werkzeug-3.0.3 blinker-1.8.2 click-8.1.7 colorama-0.4.6 flask-3.0.3 itsdangerous-2.2.0 # Start VS Code G:\div_code\foobar\venv (venv) λ code .
When in VS Code now import flask will work without any errors from Pylance.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Show powershell errors in flask-wtf web form robertkwild 14 4,147 Jun-30-2024, 03:15 PM
Last Post: robertkwild

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.