ModuleNotFoundError: No module named 'xblock.utils'

I am running tutor 17.0.2.
tutor images build openedx give me
ModuleNotFoundError: No module named ‘xblock.utils’

11.53 File “/openedx/venv/lib/python3.8/site-packages/lti_consumer/lti_xblock.py”, line 69, in
11.53 from xblockutils.resources import ResourceLoader
11.53 File “/openedx/venv/lib/python3.8/site-packages/xblockutils/resources.py”, line 12, in
11.53 from xblock.utils.resources import *
11.53 ModuleNotFoundError: No module named ‘xblock.utils’

ERROR: failed to solve: process “/bin/sh -c ./manage.py lms --settings=tutor.i18n compilejsi18n” did not complete successfully: exit code: 1
Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx:17.0.2-indigo --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:17.0.2-indigo-cache /home/ubuntu/.local/share/tutor/env/build/openedx

Thanks for any help in advance.

The error occurred when I tried to install 2 xblocks

tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=git+https://github.com/CodeWithEmad/chatgpt-xblock.git

tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=git+https://github.com/edly-io/ai-coach-xblock.git

The error persists even after the tutor is upgraded to 17.0.6.

But there was no error with

tutor local launch.

Error occurred with

tutor images build openedx.

The problem seems to be related with chatgpt-xblock.

The same error occurred for tutor version 18.1.2 as well as 17.0.6.

Hey @jdpark7
Thanks for sharing this.
I can confirm that the problem is with chatgpt-xblock. It’s an old XBlock and I can’t remember which version of tutor I’ve tested with (Nutmeg or Palm I guess). It will be fixed probably in the coming weeks, but feel free to open a PR. we can move the conversation to the repo issues, if you like.

@Emad Thank you very much for your help.

1 Like