-3

Kindly help me How to avoid debugging mode in Flask. It is constantly giving me build errors

Build Error looks similar to this

File "C:\Users\HarshitGupta\Desktop\NEw\KoreD\KoreD\templates\flask_user\_common_base.html", line 1, in top-level template code
  {% extends "flask_user/header.html" %}
File "C:\Users\HarshitGupta\Desktop\NEw\KoreD\KoreD\templates\flask_user\header.html", line 60, in top-level template code
  <li><a href="{{ url_for('.home') }}"> <i class="fa fa-pie-chart"></i>Home</a></li>
File "C:\Users\HarshitGupta\Anaconda3\lib\site-packages\flask\helpers.py", line 356, in url_for
  return appctx.app.handle_url_build_error(error, endpoint, values)
File "C:\Users\HarshitGupta\Anaconda3\lib\site-packages\flask\app.py", line 2061, in handle_url_build_error
  reraise(exc_type, exc_value, tb)
File "C:\Users\HarshitGupta\Anaconda3\lib\site-packages\flask\_compat.py", line 35, in reraise
  raise value
File "C:\Users\HarshitGupta\Anaconda3\lib\site-packages\flask\helpers.py", line 345, in url_for
  force_external=external)
File "C:\Users\HarshitGupta\Anaconda3\lib\site-packages\werkzeug\routing.py", line 1776, in build
  raise BuildError(endpoint, values, method, self)
**werkzeug.routing.BuildError: Could not build url for endpoint 'user.home'. Did you mean 'user.login' instead?**
davidism
  • 121,510
  • 29
  • 395
  • 339
  • Why in the world do you want to get rid of debugging mode? It is most definitely a good thing. Besides, your code doesn't work if it's giving build errors, which will happen with or without debugging mode. – 12944qwerty Dec 20 '21 at 21:13
  • Because I guess the error is coming because of this debug. I am working on this with my friend and for him, the code works without debug. – Hariket Sukesh Kumar Sheth Dec 21 '21 at 03:17

1 Answers1

0

Simply use app.run(debug=False) or just app.run()

Please check whether you are getting errors because of debug mode or anything else !