'endpoint' may not contain a dot '.' character.
Package:
flask
56479

Exception Class:
ValueError
Raise code
view_func: t.Optional[t.Callable] = None,
**options: t.Any,
) -> None:
"""Like :meth:`Flask.add_url_rule` but for a blueprint. The endpoint for
the :func:`url_for` function is prefixed with the name of the blueprint.
"""
if endpoint and "." in endpoint:
raise ValueError("'endpoint' may not contain a dot '.' character.")
if view_func and hasattr(view_func, "__name__") and "." in view_func.__name__:
raise ValueError("'view_func' name may not contain a dot '.' character.")
self.record(lambda s: s.add_url_rule(rule, endpoint, view_func, **options))
def app_template_filter(self, name: t.Optional[str] = None) -> t.Callable:
Links to the raise (1)
https://github.com/pallets/flask/blob/83f7efa04708a22c9701488f0f29b59c2b756bef/src/flask/blueprints.py#L374Ways to fix
Summary
Endpoints in flasks add_url_rule method must not contain dot '.' characters.
Reproduce
from flask import Flask
app = Flask(__name__)
def i():
return ""
app.add_url_rule("/", view_func=i, endpoint="index.html")
app.run()
Fix
from flask import Flask
app = Flask(__name__)
def i():
return ""
app.add_url_rule("/", view_func=i, endpoint="index") #<-- endpoint must not have a dot '.' character
app.run()
Add a possible fix
Please authorize to post fix