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

AttributeError: module 'app.db' has no attribute 'Table' #28

Open
5t33 opened this issue Sep 3, 2022 · 0 comments
Open

AttributeError: module 'app.db' has no attribute 'Table' #28

5t33 opened this issue Sep 3, 2022 · 0 comments

Comments

@5t33
Copy link

5t33 commented Sep 3, 2022

Logs from my docker container:

Running script /app/prestart.sh
Run flask migration upgrades (show current version first)
Traceback (most recent call last):
  File "/usr/local/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 990, in main
    cli.main(args=sys.argv[1:])
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 596, in main
    return super().main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 439, in decorator
    with __ctx.ensure_object(ScriptInfo).load_app().app_context():
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 406, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 256, in locate_app
    __import__(module_name)
  File "/app/app.py", line 25, in <module>
    from models import User  # noqa
  File "/app/models.py", line 5, in <module>
    recipe_tag = db.Table(
AttributeError: module 'app.db' has no attribute 'Table'

Note: I changed Flask-Login to 0.6.2. Probably not relevant.

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