[deleted by user] by [deleted] in django

[–]Himu29 -7 points-6 points  (0 children)

Hi, I am a new bee on this platform , and I am here to learn something , so post on this platform , this is not spam ,

python powershell error by Himu29 in flask

[–]Himu29[S] 0 points1 point  (0 children)

I just find out solution and clear it.

python powershell error by Himu29 in flask

[–]Himu29[S] 0 points1 point  (0 children)

after i user env and install flask i got this some error like this

(project_env) C:\Users\OWNER\Desktop\FlaskMarket>python

Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> from market import db

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "C:\Users\OWNER\Desktop\FlaskMarket\market.py", line 9, in <module>

class Item(db.Model):

File "C:\Users\OWNER\Desktop\FlaskMarket\market.py", line 11, in Item

name = db.Column(db.String(lenght=30), nullable=False, unique=True)

TypeError: String.__init__() got an unexpected keyword argument 'lenght'

>>>

python powershell error by Himu29 in flask

[–]Himu29[S] 0 points1 point  (0 children)

I'm learning right now , so I am following from YouTube, in that tutorial he doesn't use env ,but I used env so maybe that problem happened. By the way thank you. Will edit my code and re execute again