补充
(jimufun) bash-3.2$ flask forge
Generating the administrator…
Traceback (most recent call last):
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/bin/flask”, line 10, in
sys.exit(main())
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/flask/cli.py”, line 906, in main
cli.main(args=args, prog_name=name)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/flask/cli.py”, line 569, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/flask/cli.py”, line 419, in decorator
return __ctx.invoke(f, *args, **kwargs)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/Users/matt/jimufun/jimufun/init.py”, line 124, in forge
fake_admin()
File “/Users/matt/jimufun/jimufun/fakes.py”, line 15, in fake_admin
community_subtitle=“No, I’m the real thing.”
File “”, line 2, in init
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/instrumentation.py”, line 373, in _new_state_if_none
state = self._state_constructor(instance, self)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py”, line 855, in get
obj.dict[self.name] = result = self.fget(obj)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/instrumentation.py”, line 199, in state_constructor
self.dispatch.first_init(self, self.class)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/event/attr.py”, line 297, in call
fn(*args, **kw)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py”, line 3341, in _event_on_first_init
configure_mappers()
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py”, line 3229, in configure_mappers
mapper._post_configure_properties()
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py”, line 1947, in _post_configure_properties
prop.init()
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/interfaces.py”, line 196, in init
self.do_init()
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py”, line 1860, in do_init
self._process_dependent_arguments()
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py”, line 1922, in _process_dependent_arguments
self.target = self.entity.persist_selectable
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py”, line 855, in get
obj.dict[self.name] = result = self.fget(obj)
File “/Users/matt/.local/share/virtualenvs/jimufun-mIcFJAhi/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py”, line 1845, in entity
% (self.key, type(argument))
sqlalchemy.exc.ArgumentError: relationship ‘articles’ expects a class or a mapper argument (received: <class ‘sqlalchemy.sql.schema.Table’>)
(jimufun) bash-3.2$