AttributeError: module 'wtforms.validators' has no attribute 'Required
danielrazali opened this issue · comments
Hi I'm pretty new in python dev, but i got this error when trying to use the module.
i am using the code i get from the website.
it used to work before, but it stopped working.
i am on python 3.10 at the moment.
sorry if this is a noob question.
Traceback (most recent call last):
File "/Users/drazali/dev/VIATOR/pythonProject/main.py", line 5, in <module>
from flask_ldap3_login.forms import LDAPLoginForm
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask_ldap3_login/forms.py", line 15, in <module>
class LDAPLoginForm(FlaskForm):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask_ldap3_login/forms.py", line 26, in LDAPLoginForm
username = wtforms.StringField('Username', validators=[validators.Required()])
AttributeError: module 'wtforms.validators' has no attribute 'Required'
Hi @danielrazali, thanks for raising this (this is not a noob question!). This is related to #75 which we merged a fix for in #96. However that fix is yet to be released to PyPi which is the reason you've run into this bug.
Hey @danielrazali I've released a pre-release, 0.9.17b1. Could you please try this out? (pip install flask-ldap3-login==0.9.17b1
). If it appears to work as expected, I'll proceed to release it as a public release.
Great to hear, I'll put out a mainline release this evening. 0.9.17 is now live on Pypi. pip install flask-ldap3-login==0.9.17