ctxis / crackerjack

CrackerJack / Hashcat Web Interface / Context Information Security
https://www.contextis.com/en/resources/tools/crackerjack
MIT License
357 stars 86 forks source link

sqlalchemy version issue #29

Closed tigre-bleu closed 1 year ago

tigre-bleu commented 1 year ago

Hello,

I tried to install crackerjack on Ubuntu 22.04.2 LTS but this fails with the exception below while running flask db init.

Installation is performed in a venv with pip (procedure as in documentation). pip requirements install goes fine.

Traceback (most recent call last):
  File "/opt/crackerjack/venv/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/flask/cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/click/core.py", line 1254, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/click/core.py", line 1297, in resolve_command
    cmd = self.get_command(ctx, cmd_name)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/flask/cli.py", line 542, in get_command
    rv = info.load_app().cli.get_command(ctx, name)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/flask/cli.py", line 392, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/opt/crackerjack/wsgi.py", line 1, in <module>
    from app import create_app
  File "/opt/crackerjack/app/__init__.py", line 12, in <module>
    db = SQLAlchemy()
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 758, in __init__
    _include_sqlalchemy(self, query_class)
  File "/opt/crackerjack/venv/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 112, in _include_sqlalchemy
    for key in module.__all__:
AttributeError: module 'sqlalchemy' has no attribute '__all__'. Did you mean: '__file__'?

I tried to pin some old versions of Flask-SQLAlchemy in requirements.txt but without success.

sadreck commented 1 year ago

Hey, sorry for the slow response. I had to hardcode the sqlalchemy package itself ontop of the Flask-SQLAlchemy one.

Give it another go, and feel free to re-open this issue if the problem persists.

tigre-bleu commented 1 year ago

That's fine now. Thanks