Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizGeneral Tech Bugs & Fixes 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
I was able to reproduce the issue with just flask. Looks like it has to do with latest werkzeug release. Flask doesn't specify which werkzeug to use and just says anything above 0.14 so you automatically get the latest version (0.15.1 as of today) and on. Version 0.15.0 changes implementation of http exceptions a little, specifically this bit right here introduced the Unauthorized http exception constructor, so it now does not accept that response argument. Before it simply extended HTTPException.
So I suggest to simply pin a spicific version of werkzeug in your project requirements. Anything below version 0.15, say 0.14.1 should work for you.
What else you can do:
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I'm running the demo code of Python Eve and I'm having troubles with the Auth part. The code I'm running is identical as the repo, except for MongoDB URI in
settings.py.Everything works fine if I put correct credentials in Basic Auth (which are
user=adminpasswd=secret) but if I don't put Authorization header or correct credentials I don't get a 401, as I would expect, but the application crashes returning 500. This is the traceback.