-
-
Notifications
You must be signed in to change notification settings - Fork 287
ValueError: 'name' may not contain a dot '.' character. when execute flask run #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
i got the same issue, have you solved it ? @janaka1984 |
Flask==1.1.2 |
I think the issue is in bp = Blueprint(__name__, 'home') to this line: bp = Blueprint('home', __name__) and it should work. |
updated the demo. Thanks @TechStudent11 |
@lepture no prob :) |
@lepture the main branch README still has the wrong example code (the Hello World section). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ flask run
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
Traceback (most recent call last):
File "c:\users\janaka_w\appdata\local\programs\python\python36\Lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\janaka_w\appdata\local\programs\python\python36\Lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "E:\PYTHON TEST PROJECT\example-oauth2-server-master\env-auth\Scripts\flask.exe_main.py", line 7, in
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\cli.py", line 990, in main
cli.main(args=sys.argv[1:])
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\cli.py", line 596, in main
return super().main(*args, **kwargs)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\click\core.py", line 1062, in main
rv = self.invoke(ctx)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\click\core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\click\core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\click\core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\cli.py", line 845, in run_command
app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\cli.py", line 321, in init
self._load_unlocked()
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\cli.py", line 346, in _load_unlocked
self._app = rv = self.loader()
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\cli.py", line 406, in load_app
app = locate_app(self, import_name, None, raise_if_not_found=False)
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\cli.py", line 256, in locate_app
import(module_name)
File "E:\PYTHON TEST PROJECT\example-oauth2-server-master\app.py", line 1, in
from website.app import create_app
File "E:\PYTHON TEST PROJECT\example-oauth2-server-master\website\app.py", line 5, in
from .routes import bp
File "E:\PYTHON TEST PROJECT\example-oauth2-server-master\website\routes.py", line 11, in
bp = Blueprint(name, 'home')
File "e:\python test project\example-oauth2-server-master\env-auth\lib\site-packages\flask\blueprints.py", line 195, in init
raise ValueError("'name' may not contain a dot '.' character.")
ValueError: 'name' may not contain a dot '.' character.
The text was updated successfully, but these errors were encountered: