werkzeug.routing.BuildError: Could not build url for endpoint 'main.2023_services'. Did you mean 'main.our_service' instead?
__call__
def __call__(self, environ, start_response):
"""The WSGI server calls the Flask application object as the
WSGI application. This calls :meth:`wsgi_app` which can be
wrapped to applying middleware."""
return self.wsgi_app(environ, start_response)
def __repr__(self):
return '<%s %r>' % (
self.__class__.__name__,
self.name,
wsgi_app
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except:
error = sys.exc_info()[1]
raise
return response(environ, start_response)
finally:
handle_exception
# if we want to repropagate the exception, we can attempt to
# raise it with the whole traceback in case we can do that
# (the function was actually called from the except part)
# otherwise, we just raise the error again
if exc_value is e:
reraise(exc_type, exc_value, tb)
else:
raise e
self.log_exception((exc_type, exc_value, tb))
if handler is None:
reraise
from io import StringIO
def reraise(tp, value, tb=None):
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
raise value
implements_to_string = _identity
else:
text_type = unicode
wsgi_app
ctx = self.request_context(environ)
error = None
try:
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except:
error = sys.exc_info()[1]
full_dispatch_request
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(self, rv, from_error_handler=False):
"""Given the return value from a view function this finalizes
the request by converting it into a response and invoking the
handle_user_exception
return self.handle_http_exception(e)
handler = self._find_error_handler(e)
if handler is None:
reraise(exc_type, exc_value, tb)
return handler(e)
def handle_exception(self, e):
"""Default exception handling that kicks in when an exception
occurs that is not caught. In debug mode the exception will
reraise
from io import StringIO
def reraise(tp, value, tb=None):
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
raise value
implements_to_string = _identity
else:
text_type = unicode
full_dispatch_request
self.try_trigger_before_first_request_functions()
try:
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(self, rv, from_error_handler=False):
dispatch_request
# request came with the OPTIONS method, reply automatically
if getattr(rule, 'provide_automatic_options', False) \
and req.method == 'OPTIONS':
return self.make_default_options_response()
# otherwise dispatch to the handler for that endpoint
return self.view_functions[rule.endpoint](**req.view_args)
def full_dispatch_request(self):
"""Dispatches the request and on top of that performs request
pre and postprocessing as well as HTTP exception catching and
error handling.
sitemap
title="About")
@main.route("../about/sitemap.html")
def sitemap():
return render_template("about/sitemap.html",
title="About")
#------------------------------------------------------------#
@main.route("../resources/prayer.html")
def prayer():
render_template
context of the template.
"""
ctx = _app_ctx_stack.top
ctx.app.update_template_context(context)
return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
context, ctx.app)
def render_template_string(source, **context):
"""Renders a template from the given template source string
with the given context. Template variables will be autoescaped.
_render
def _render(template, context, app):
"""Renders the template and fires the signal"""
before_render_template.send(app, template=template, context=context)
rv = template.render(context)
template_rendered.send(app, template=template, context=context)
return rv
def render_template(template_name_or_list, **context):
render
def wrap_render_func(original_render):
def render(self, *args, **kwargs):
if not self.environment.is_async:
return original_render(self, *args, **kwargs)
loop = asyncio.get_event_loop()
return loop.run_until_complete(self.render_async(*args, **kwargs))
return update_wrapper(render, original_render)
render
vars = dict(*args, **kwargs)
try:
return concat(self.root_render_func(self.new_context(vars)))
except Exception:
exc_info = sys.exc_info()
return self.environment.handle_exception(exc_info, True)
def render_async(self, *args, **kwargs):
"""This works similar to :meth:`render` but returns a coroutine
that when awaited returns the entire rendered template string. This
requires the async feature to be enabled.
handle_exception
if rendered and self.exception_formatter is not None:
return self.exception_formatter(traceback)
if self.exception_handler is not None:
self.exception_handler(traceback)
exc_type, exc_value, tb = traceback.standard_exc_info
reraise(exc_type, exc_value, tb)
def join_path(self, template, parent):
"""Join a template with the parent. By default all the lookups are
relative to the loader root so this method returns the `template`
parameter unchanged, but if the paths should be relative to the
reraise
from io import BytesIO, StringIO
NativeStringIO = StringIO
def reraise(tp, value, tb=None):
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
raise value
ifilter = filter
imap = map
izip = zip
top-level template code
{% extends "layout.html" %}
{% block content %}
<div lang="en-US" class="justify-article-text">
<h2>Directory Tree</h2>
<a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.home') }}">http://mauimission.org</a><br>
├── about<br> │ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.bishops') }}">bishops.html</a><br>
top-level template code
</span>
</center>
{% include "readings_bar.html" %}
</div>
<div class="col-md-8">
{% block content %}{% endblock %}
</div>
<div class="col-md-4">
<div class="content-sidebar web-sidebar">
<center>
<p style="font-family: Palatino; font-size: 12pt; font-variant:small-caps;" >
block "content"
│ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.services_2018') }}">services_2018.html</a><br>
│ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.services_2019') }}">services_2019.html</a><br>
│ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.services_2020') }}">services_2020.html</a><br>
│ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.services_2021') }}">services_2021.html</a><br>
│ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.services_2022') }}">services_2022.html</a><br>
│ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.2023_services') }}">2023_services.html</a><br>
│ └── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.2024_services') }}">2024_services.html</a><br>
├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.hymnal') }}">hymnal.html</a><br>
├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.matins_reading') }}">matins_reading.html</a><br>
├── news<br> │ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.news_2012') }}">news_2012.html</a><br>
│ ├── <a style="font-size: 12px;" class="web-link-experiment-red-reg" href="{{ url_for('main.news_2013') }}">news_2013.html</a><br>
url_for
# deal with that sort of stuff.
values['_external'] = external
values['_anchor'] = anchor
values['_method'] = method
values['_scheme'] = scheme
return appctx.app.handle_url_build_error(error, endpoint, values)
if anchor is not None:
rv += '#' + url_quote(anchor)
return rv
handle_url_build_error
# At this point we want to reraise the exception. If the error is
# still the same one we can reraise it with the original traceback,
# otherwise we raise it from here.
if error is exc_value:
reraise(exc_type, exc_value, tb)
raise error
def preprocess_request(self):
"""Called before the request is dispatched. Calls
:attr:`url_value_preprocessors` registered with the app and the
reraise
from io import StringIO
def reraise(tp, value, tb=None):
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
raise value
implements_to_string = _identity
else:
text_type = unicode
url_for
url_adapter.url_scheme = scheme
try:
try:
rv = url_adapter.build(endpoint, values, method=method,
force_external=external)
finally:
if old_scheme is not None:
url_adapter.url_scheme = old_scheme
except BuildError as error:
# We need to inject the values again so that the app callback can
build
else:
values = {}
rv = self._partial_build(endpoint, values, method, append_unknown)
if rv is None:
raise BuildError(endpoint, values, method, self)
domain_part, path = rv
host = self.get_host(domain_part)
# shortcut this.
werkzeug.routing.BuildError: Could not build url for endpoint 'main.2023_services'. Did you mean 'main.our_service' instead?
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.