migrations problem in django

560 views
Skip to first unread message

Paras Kashyap

unread,
Jun 1, 2022, 10:35:52 PM6/1/22
to Django users
TypeError: Field.__init__() got an unexpected keyword argument 'max_lenght'
Please someone tell me how to fix this error, this error occurs when i try to make migrations

Mike Dewhirst

unread,
Jun 1, 2022, 11:37:29 PM6/1/22
to django...@googlegroups.com, Paras Kashyap
On 2/06/2022 3:00 am, Paras Kashyap wrote:
TypeError: Field.__init__() got an unexpected keyword argument 'max_lenght'

You have probably seen this already ... should be 'max_length'

Please someone tell me how to fix this error, this error occurs when i try to make migrations
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/81c3da4c-5607-47e9-9fb1-458fa936afc1n%40googlegroups.com.


-- 
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.
OpenPGP_signature

Ayser shuhaib

unread,
Jun 2, 2022, 7:21:56 AM6/2/22
to django...@googlegroups.com, Paras Kashyap
You probably have a Integer field in one of your models with max_length arguments, so remove that argument and that should solve the problem 

Steve Smith

unread,
Jun 2, 2022, 5:45:46 PM6/2/22
to django...@googlegroups.com
Looks like a spelling error at first glance....max_length...not max_lenght

That's my first guess...

From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Paras Kashyap <paraskas...@gmail.com>
Sent: Wednesday, June 1, 2022 12:00 PM
To: Django users <django...@googlegroups.com>
Subject: migrations problem in django
 
TypeError: Field.__init__() got an unexpected keyword argument 'max_lenght'
Please someone tell me how to fix this error, this error occurs when i try to make migrations

--
Reply all
Reply to author
Forward
0 new messages