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

cannot import name '_app_ctx_stack' from 'flask' error when launching report #55

Open
northwestwitch opened this issue Feb 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@northwestwitch
Copy link
Member

To reproduce:

make build
make setup
make report
(base) chiararasi@n190-p146 chanjo-report % make report
docker-compose run -p 5000:5000 chanjo-report chanjo -d mysql+pymysql://chanjoUser:chanjoPassword@mariadb/chanjo4_test report --render html
[+] Running 1/0
 ✔ Container mariadb  Running                                              0.0s
Traceback (most recent call last):
  File "/venv/bin/chanjo", line 8, in <module>
    sys.exit(root())
  File "/venv/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/venv/lib/python3.8/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/venv/lib/python3.8/site-packages/click/core.py", line 1682, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
  File "/venv/lib/python3.8/site-packages/click/core.py", line 1729, in resolve_command
    cmd = self.get_command(ctx, cmd_name)
  File "/venv/lib/python3.8/site-packages/chanjo/cli/base.py", line 39, in get_command
    return commands[name].load()
  File "/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2456, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/worker/app/chanjo_report/cli/__init__.py", line 2, in <module>
    from .core import report
  File "/home/worker/app/chanjo_report/cli/core.py", line 4, in <module>
    from chanjo_report.interfaces import html, pdf
  File "/home/worker/app/chanjo_report/interfaces/__init__.py", line 2, in <module>
    from .html import render_html
  File "/home/worker/app/chanjo_report/interfaces/html.py", line 4, in <module>
    from chanjo_report.server.app import create_app
  File "/home/worker/app/chanjo_report/server/app.py", line 5, in <module>
    from .config import DefaultConfig
  File "/home/worker/app/chanjo_report/server/config.py", line 2, in <module>
    from .blueprints import report_bp, index_bp
  File "/home/worker/app/chanjo_report/server/blueprints/__init__.py", line 2, in <module>
    from .index import index_bp
  File "/home/worker/app/chanjo_report/server/blueprints/index/__init__.py", line 2, in <module>
    from .views import index_bp
  File "/home/worker/app/chanjo_report/server/blueprints/index/views.py", line 7, in <module>
    from chanjo_report.server.extensions import api
  File "/home/worker/app/chanjo_report/server/extensions.py", line 3, in <module>
    from flask_sqlalchemy import SQLAlchemy
  File "/venv/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py", line 14, in <module>
    from flask import _app_ctx_stack, abort, current_app, request
ImportError: cannot import name '_app_ctx_stack' from 'flask' (/venv/lib/python3.8/site-packages/flask/__init__.py)
make: *** [report] Error 1
(base) chiararasi@n190-p146 chanjo-report %
@northwestwitch northwestwitch added the bug Something isn't working label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant