Skip to content
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

ValueError: The name 'admin' is already registered for a different blueprint. Use 'name=' to provide a unique name. #244

Open
chenfei5201213 opened this issue Nov 8, 2021 · 0 comments

Comments

@chenfei5201213
Copy link

Traceback (most recent call last):
File "/Users/chenfei/anaconda3/bin/sandman2ctl", line 8, in
sys.exit(main())
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/main.py", line 57, in main
app = get_app(args.URI, read_only=args.read_only, schema=args.schema)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/app.py", line 60, in get_app
_reflect_all(exclude_tables, admin, read_only, schema=schema)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/app.py", line 139, in _reflect_all
register_model(cls, admin)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/app.py", line 173, in register_model
admin.add_view(CustomAdminView(cls, db.session))
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask_admin/base.py", line 540, in add_view
self.app.register_blueprint(view.create_blueprint(self))
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask/scaffold.py", line 57, in wrapper_func
return f(self, *args, **kwargs)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1028, in register_blueprint
blueprint.register(self, options)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask/blueprints.py", line 306, in register
f"The name '{self_name}' is already registered for"
ValueError: The name 'admin' is already registered for a different blueprint. Use 'name=' to provide a unique name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant