Aspects initialization failing on Tutor 19.0.5 (Sumac) – ClickHouse SQLAlchemy dialect error

Hi everyone,

I am trying to integrate Aspects with Open edX Sumac using Tutor local.

Environment:

  • Open edX: Sumac

  • Tutor: 19.0.5

  • Host Python: 3.10.12

  • OS: (Ubuntu.)

  • Deployment: Tutor local

Steps followed:

pip install tutor-contrib-aspects
tutor plugins enable aspects
tutor config save

tutor images build openedx --no-cache
tutor images build mfe --no-cache
tutor images build aspects aspects-superset

tutor local do init

The plugin installed version 1.3.0 automatically.

During tutor local do init, I get the following error:

sqlalchemy.exc.NoSuchModuleError:
Can’t load plugin: sqlalchemy.dialects:clickhouse.native

Has anyone faced this issue with Sumac + Tutor 19?

Is there a specific compatible version of tutor-contrib-aspects required?

Thanks in advance!

I’m not sure why you are getting such an old version, I just tried pip install tutor-contrib-aspects and received version 3.0.3
Perhaps try specifying the version to install with pip install tutor-contrib-aspects==3.0.3 for the latest release.

Compatibility: Current versions of the plugin are compatible with Tutor 19.0.0 and later and support Open edX releases from Sumac onward

Thank you for checking.
I’m using Python 3.10.12, so it should be compatible (it installs version 1.3.0).

could you please confirm:

  • Which Tutor version you are using with Aspects 3.0.3?

  • Are you running this with Tutor 19.x (Sumac)?

I’m currently on the latest Ulmo release so not the exact same environment as yours, but at least according to the documentation the latest version should be suitable for you too. For full disclosure I haven’t actually tested the aspects plugin, just installed it to confirm didn’t get the same issue as you.

@TyHob @braden @jill @sarina @Sara_Burns @Emad ,

The documentation and the Tutor plugins index appear to be mismatched. Any help would be greatly appreciated.

Yes the problem is likely Python 3.10 on the host. Tutor 19 supports it, Aspects 2.0+ does not. If you go to 3.11 you should be able to get compatibility with both. We should update the compatibility docs to include this, though going forward Aspects versions will be tied more closely to named releases so it won’t be such an issue.

That doesn’t explain the sqlalchemy error, however. If you need to be on Py 10 / Aspects 1.3.0 let me know and I can try to dig into it some.

1 Like

Thank you for the clarification.

At the moment, I need to keep the setup on Python 3.10.12 due to environment constraints.

I will proceed with Aspects 1.3.0 as suggested. Regarding the SQLAlchemy error, I would really appreciate it if you could help look into it when possible. I’ve attached the full traceback screenshot for the SQLAlchemy error below.

Thank you again for your support.

I’m attempting to build a 3.10 / Tutor 19 / Aspects 1.3.0 environment now, to see if I can replicate the issue. Can you check on the host machine (where you run tutor from) what you have in this file:

env/plugins/aspects/apps/aspects/migrations/alembic.ini

At line 38 you should have something that looks like this:

sqlalchemy.url = clickhouse+native://ch_admin:your_password@clickhouse:9000/xapi

Does that line look correct to you?

I have a branch here that is working for me locally. I’m not sure why the versions of things we’ve been using there for a long time are no longer working, and am actually out sick today, but I think if you pip install from this branch (based on 1.3.0 but with some hacky fixes for force versions of packages to install) instead of PyPI it will get things building for you: