archlinux / arch-security-tracker

Arch Linux Security Tracker
https://security.archlinux.org
MIT License
125 stars 40 forks source link

Cannot run the tracker after following the instructions on the README.md #190

Closed lucabtz closed 3 years ago

lucabtz commented 3 years ago

Hello, After following the instructions for running the tracker make, make run and make user all fail with the same error

git submodule update --recursive --init --rebase
./trackerctl setup bootstrap
Traceback (most recent call last):
  File "/home/neutrin0/Repos/arch-security-tracker/./trackerctl", line 5, in <module>
    cli.main()
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/flask/cli.py", line 596, in main
    return super().main(*args, **kwargs)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/flask/cli.py", line 439, in decorator
    with __ctx.ensure_object(ScriptInfo).load_app().app_context():
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/flask/cli.py", line 395, in load_app
    app = call_factory(self, self.create_app)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/flask/cli.py", line 119, in call_factory
    return app_factory(*args, **kwargs)
  File "/home/neutrin0/Repos/arch-security-tracker/tracker/__init__.py", line 95, in create_app
    orm.configure_mappers()
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy/orm/mapper.py", line 3350, in configure_mappers
    _configure_registries(_all_registries(), cascade=True)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy/orm/mapper.py", line 3383, in _configure_registries
    Mapper.dispatch._for_class(Mapper).after_configured()
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy/event/attr.py", line 256, in __call__
    fn(*args, **kw)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy/orm/events.py", line 743, in wrap
    fn(*arg, **kw)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy_continuum/builder.py", line 163, in configure_versioned_classes
    self.build_transaction_class()
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy_continuum/builder.py", line 141, in build_transaction_class
    self.manager.create_transaction_model()
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy_continuum/manager.py", line 166, in create_transaction_model
    self.transaction_cls = self.transaction_cls(self)
  File "/home/neutrin0/Repos/arch-security-tracker/.virtualenv/lib/python3.9/site-packages/sqlalchemy_continuum/factory.py", line 9, in __call__
    registry = manager.declarative_base._decl_class_registry
AttributeError: type object 'Model' has no attribute '_decl_class_registry'
make: *** [Makefile:26: setup] Error 1

I suspect the API for sqlalchemy_continuum has changed in later versions and installing it from the requirements.txt got the lastest as no version is specified there. Maybe specifying the package versions in the requirements.txt would fix this and possible future issues of the same kind.

jelly commented 3 years ago

The solution is:

pip install SQLAlchemy~=1.3.0

See https://github.com/archlinux/arch-security-tracker/pull/186/files

lucabtz commented 3 years ago

Indeed that fixed it. Maybe adding the version as indicated by the PR would be a good idea for newcomers

jelly commented 3 years ago

Fixed in https://github.com/archlinux/arch-security-tracker/commit/469dac4294b6ca65b9a52b607d119bc6c4aa63ab