I'm learning to create flask apps and I came across an issue when setting form methods. This is the code I'm using:
@app.route("/register", methods=['GET', 'POST'])
def register():
form = RegistrationForm()
return render_template('register.html', title='Register', form=form)
And when I run the app I get this error:
Traceback (most recent call last):
File "C:\Python310\lib\crypt.py", line 6, in <module>
import _crypt
ModuleNotFoundError: No module named '_crypt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Programming\Python Projects\Flask\flaskblog.py", line 1, in <module>
from crypt import methods
File "C:\Python310\lib\crypt.py", line 9, in <module>
raise ImportError("The crypt module is not supported on Windows")
ImportError: The crypt module is not supported on Windows
I tried Googling but couldn't find a proper solution. Can someone tell me how to fix this error?