[GH-ISSUE #244] ValueError: The name 'admin' is already registered for a different blueprint. Use 'name=' to provide a unique name. #80

Open
opened 2026-02-26 01:33:04 +03:00 by kerem · 0 comments
Owner

Originally created by @chenfei5201213 on GitHub (Nov 8, 2021).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/244

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.

Originally created by @chenfei5201213 on GitHub (Nov 8, 2021). Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/244 Traceback (most recent call last): File "/Users/chenfei/anaconda3/bin/sandman2ctl", line 8, in <module> 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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sandman2-jeffknupp#80
No description provided.