We Are Going To Discuss About TypeError: __init__() got an unexpected keyword argument ‘as_tuple’. So lets Start this Python Article.
TypeError: __init__() got an unexpected keyword argument ‘as_tuple’
- How to solve TypeError: __init__() got an unexpected keyword argument 'as_tuple'
As of version 2.1.0,
werkzeug
has removed theas_tuple
argument toClient
. Since Flask wraps werkzeug and you're using a version that still passes this argument, it will fail. See the exact change on the GitHub PR here.
You can take one of two paths to solve this:
Upgrade flask
Pin your werkzeug version# in requirements.txt werkzeug==2.0.3
- TypeError: __init__() got an unexpected keyword argument 'as_tuple'
As of version 2.1.0,
werkzeug
has removed theas_tuple
argument toClient
. Since Flask wraps werkzeug and you're using a version that still passes this argument, it will fail. See the exact change on the GitHub PR here.
You can take one of two paths to solve this:
Upgrade flask
Pin your werkzeug version# in requirements.txt werkzeug==2.0.3
Solution 1
As of version 2.1.0, werkzeug
has removed the as_tuple
argument to Client
. Since Flask wraps werkzeug and you’re using a version that still passes this argument, it will fail. See the exact change on the GitHub PR here.
You can take one of two paths to solve this:
-
Upgrade flask
-
Pin your werkzeug version
# in requirements.txt
werkzeug==2.0.3
Original Author Christian Di Lorenzo Of This Content
Solution 2
Adding to Christian Di Lorenzo’s answer
- Upgrade flask
# in requirements.txt
Flask==2.1.1
- Pin your werkzeug version
# in requirements.txt
werkzeug==2.0.3
Original Author Shalin Hudda Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.