overhangio / tutor-indigo

An elegant, customizable theme for Open edX
GNU Affero General Public License v3.0
73 stars 275 forks source link

Error during tutor images build #61

Closed jjdeezy18 closed 6 months ago

jjdeezy18 commented 6 months ago

Hi,

I am trying to change the logo of indigo theme but I am having issues when running tutor images build openedx to apply the changes.

What I had done so far:

  1. Updated tutor to latest version
  2. Updated indigo theme to latest version
  3. Uninstall docker and docker compose completely then reinstall latest version

Error:

 => ERROR [production 28/30] RUN openedx-assets themes     && openedx-assets collect --settings=tutor.assets     && rdfind -makesymlinks true -foll  113.0s
------
 > [production 28/30] RUN openedx-assets themes     && openedx-assets collect --settings=tutor.assets     && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/:
8.200 Compiling lms sass assets from theme /openedx/themes/branded...
8.200 Compiling Sass: lms/static/sass -> /openedx/themes/branded/lms/static/css
8.200     with Sass lookup path: common/static
8.200     with Sass lookup path: common/static/sass
8.200     with Sass lookup path: node_modules/@edx
8.200     with Sass lookup path: node_modules
8.200     with Sass lookup path: /openedx/themes/branded/lms/static/sass/partials
8.200     with Sass lookup path: lms/static/sass/partials
8.200     with Sass lookup path: lms/static/sass
8.200 rtlcss /openedx/themes/branded/lms/static/css/bootstrap/lms-main.css /openedx/themes/branded/lms/static/css/bootstrap/lms-main-rtl.css
8.319 rtlcss: Warning! No config present, using defaults.
8.482 Saving: /openedx/themes/branded/lms/static/css/bootstrap/lms-main-rtl.css
8.726 rtlcss /openedx/themes/branded/lms/static/css/discussion/lms-discussion-bootstrap.css /openedx/themes/branded/lms/static/css/discussion/lms-discussion-bootstrap-rtl.css
8.848 rtlcss: Warning! No config present, using defaults.
8.978 Saving: /openedx/themes/branded/lms/static/css/discussion/lms-discussion-bootstrap-rtl.css
18.09 Compiling Sass: /openedx/themes/branded/lms/static/sass -> /openedx/themes/branded/lms/static/css
18.09     with Sass lookup path: common/static
18.09     with Sass lookup path: common/static/sass
18.09     with Sass lookup path: node_modules/@edx
18.09     with Sass lookup path: node_modules
18.09     with Sass lookup path: /openedx/themes/branded/lms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass
18.09  Sass dir '/openedx/themes/branded/lms/static/certificates/sass' does not exists, skipping sass compilation for '/openedx/themes/branded'
18.09 Compiling Sass: xmodule/assets -> /openedx/themes/branded/lms/static/css
18.09     with Sass lookup path: common/static
18.09     with Sass lookup path: common/static/sass
18.09     with Sass lookup path: node_modules/@edx
18.09     with Sass lookup path: node_modules
18.09     with Sass lookup path: /openedx/themes/branded/lms/static/sass/partials
18.09     with Sass lookup path: /openedx/themes/branded/cms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass/partials
18.09     with Sass lookup path: cms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass
18.09     with Sass lookup path: cms/static/sass
18.09 Compiling cms sass assets from theme /openedx/themes/branded...
18.09 Compiling Sass: xmodule/assets -> /openedx/themes/branded/cms/static/css
18.09     with Sass lookup path: common/static
18.09     with Sass lookup path: common/static/sass
18.09     with Sass lookup path: node_modules/@edx
18.09     with Sass lookup path: node_modules
18.09     with Sass lookup path: /openedx/themes/branded/lms/static/sass/partials
18.09     with Sass lookup path: /openedx/themes/branded/cms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass/partials
18.09     with Sass lookup path: cms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass
18.09     with Sass lookup path: cms/static/sass
18.09 Compiling lms sass assets from theme /openedx/themes/indigo...
18.09 Compiling Sass: lms/static/sass -> /openedx/themes/indigo/lms/static/css
18.09     with Sass lookup path: common/static
18.09     with Sass lookup path: common/static/sass
18.09     with Sass lookup path: node_modules/@edx
18.09     with Sass lookup path: node_modules
18.09     with Sass lookup path: /openedx/themes/indigo/lms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass/partials
18.09     with Sass lookup path: lms/static/sass
18.09 rtlcss /openedx/themes/indigo/lms/static/css/bootstrap/lms-main.css /openedx/themes/indigo/lms/static/css/bootstrap/lms-main-rtl.css
18.21 rtlcss: Warning! No config present, using defaults.
18.36 Saving: /openedx/themes/indigo/lms/static/css/bootstrap/lms-main-rtl.css
18.59 rtlcss /openedx/themes/indigo/lms/static/css/discussion/lms-discussion-bootstrap.css /openedx/themes/indigo/lms/static/css/discussion/lms-discussion-bootstrap-rtl.css
18.71 rtlcss: Warning! No config present, using defaults.
18.87 Saving: /openedx/themes/indigo/lms/static/css/discussion/lms-discussion-bootstrap-rtl.css
23.30 Compiling Sass: /openedx/themes/indigo/lms/static/sass -> /openedx/themes/indigo/lms/static/css
23.30     with Sass lookup path: common/static
23.30     with Sass lookup path: common/static/sass
23.30     with Sass lookup path: node_modules/@edx
23.30     with Sass lookup path: node_modules
23.30     with Sass lookup path: /openedx/themes/indigo/lms/static/sass/partials
23.30     with Sass lookup path: lms/static/sass/partials
23.30     with Sass lookup path: lms/static/sass
23.30 Compiling Sass: /openedx/themes/indigo/lms/static/certificates/sass -> /openedx/themes/indigo/lms/static/certificates/css
23.30     with Sass lookup path: common/static
23.30     with Sass lookup path: common/static/sass
23.30     with Sass lookup path: node_modules/@edx
23.30     with Sass lookup path: node_modules
23.30     with Sass lookup path: /openedx/themes/indigo/lms/static/sass/partials
23.30     with Sass lookup path: /openedx/themes/indigo/lms/static/sass
23.30 Compiling Sass: xmodule/assets -> /openedx/themes/indigo/lms/static/css
23.30     with Sass lookup path: common/static
23.30     with Sass lookup path: common/static/sass
23.30     with Sass lookup path: node_modules/@edx
23.30     with Sass lookup path: node_modules
23.30     with Sass lookup path: /openedx/themes/indigo/lms/static/sass/partials
23.30     with Sass lookup path: /openedx/themes/indigo/cms/static/sass/partials
23.30     with Sass lookup path: lms/static/sass/partials
23.30     with Sass lookup path: cms/static/sass/partials
23.30     with Sass lookup path: lms/static/sass
23.30     with Sass lookup path: cms/static/sass
23.30 Compiling cms sass assets from theme /openedx/themes/indigo...
23.30 Compiling Sass: cms/static/sass -> /openedx/themes/indigo/cms/static/css
23.30     with Sass lookup path: common/static
23.30     with Sass lookup path: common/static/sass
23.30     with Sass lookup path: node_modules/@edx
23.30     with Sass lookup path: node_modules
23.30     with Sass lookup path: lms/static/sass/partials
23.30     with Sass lookup path: /openedx/themes/indigo/cms/static/sass/partials
23.30     with Sass lookup path: cms/static/sass/partials
23.30     with Sass lookup path: cms/static/sass
23.30 rtlcss /openedx/themes/indigo/cms/static/css/bootstrap/studio-main.css /openedx/themes/indigo/cms/static/css/bootstrap/studio-main-rtl.css
23.44 rtlcss: Warning! No config present, using defaults.
23.56 Saving: /openedx/themes/indigo/cms/static/css/bootstrap/studio-main-rtl.css
24.36 Compiling Sass: /openedx/themes/indigo/cms/static/sass -> /openedx/themes/indigo/cms/static/css
24.36     with Sass lookup path: common/static
24.36     with Sass lookup path: common/static/sass
24.36     with Sass lookup path: node_modules/@edx
24.36     with Sass lookup path: node_modules
24.36     with Sass lookup path: lms/static/sass/partials
24.36     with Sass lookup path: /openedx/themes/indigo/cms/static/sass/partials
24.36     with Sass lookup path: cms/static/sass/partials
24.36     with Sass lookup path: cms/static/sass
24.36 Compiling Sass: xmodule/assets -> /openedx/themes/indigo/cms/static/css
24.36     with Sass lookup path: common/static
24.36     with Sass lookup path: common/static/sass
24.36     with Sass lookup path: node_modules/@edx
24.36     with Sass lookup path: node_modules
24.36     with Sass lookup path: /openedx/themes/indigo/lms/static/sass/partials
24.36     with Sass lookup path: /openedx/themes/indigo/cms/static/sass/partials
24.36     with Sass lookup path: lms/static/sass/partials
24.36     with Sass lookup path: cms/static/sass/partials
24.36     with Sass lookup path: lms/static/sass
24.36     with Sass lookup path: cms/static/sass
24.76 python manage.py lms --settings=tutor.assets collectstatic --noinput > /dev/null
109.2 Traceback (most recent call last):
109.2   File "manage.py", line 106, in <module>
109.2     execute_from_command_line([sys.argv[0]] + django_args)
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
109.2     utility.execute()
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 436, in execute
109.2     self.fetch_command(subcommand).run_from_argv(self.argv)
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
109.2     self.execute(*args, **cmd_options)
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
109.2     output = self.handle(*args, **options)
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
109.2     collected = self.collect()
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 148, in collect
109.2     for original_path, processed_path, processed in processor:
109.2   File "/openedx/venv/lib/python3.8/site-packages/require/storage.py", line 175, in post_process
109.2     for path in super_class.post_process(paths, dry_run, **options):
109.2   File "/openedx/edx-platform/openedx/core/djangoapps/theming/storage.py", line 293, in post_process
109.2     yield from super_class.post_process(paths.copy(), dry_run, **options)
109.2   File "/openedx/venv/lib/python3.8/site-packages/pipeline/storage.py", line 42, in post_process
109.2     yield from super_class.post_process(
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 488, in post_process
109.2     yield from super().post_process(*args, **kwargs)
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 301, in post_process
109.2     for name, hashed_name, processed, _ in self._post_process(
109.2   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 364, in _post_process
109.2     content = original_file.read().decode("utf-8")
109.2 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9b in position 963561: invalid start byte
110.3 Traceback (most recent call last):
110.3   File "/openedx/bin/openedx-assets", line 218, in <module>
110.3     main()
110.3   File "/openedx/bin/openedx-assets", line 89, in main
110.3     args.func(args)
110.3   File "/openedx/bin/openedx-assets", line 157, in run_collect
110.3     assets.collect_assets(args.systems, args.settings)
110.3   File "/openedx/edx-platform/pavelib/assets.py", line 606, in collect_assets
110.3     sh(django_cmd(sys, settings, "collectstatic --noinput {logfile_str}".format(
110.3   File "/openedx/venv/lib/python3.8/site-packages/paver/shell.py", line 60, in sh
110.3     return dry(command, runpipe)
110.3   File "/openedx/venv/lib/python3.8/site-packages/paver/easy.py", line 15, in dry
110.3     return func(*args, **kw)
110.3   File "/openedx/venv/lib/python3.8/site-packages/paver/shell.py", line 55, in runpipe
110.3     raise BuildFailure("Subprocess return code: %d" % p.returncode)
110.3 paver.tasks.BuildFailure: Subprocess return code: 1
------
Dockerfile:215
--------------------
 214 |     COPY --chown=app:app ./themes/ /openedx/themes/
 215 | >>> RUN openedx-assets themes \
 216 | >>>     && openedx-assets collect --settings=tutor.assets \
 217 | >>>     # De-duplicate static assets with symlinks
 218 | >>>     && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/
 219 |
--------------------
ERROR: failed to solve: process "/bin/sh -c openedx-assets themes     && openedx-assets collect --settings=tutor.assets     && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/" 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/linux/.local/share/tutor/env/build/openedx

Thank you!

Abdul-Muqadim-Arbisoft commented 6 months ago

I was unable to reproduce this issue with tutor quince, I followed the steps mentioned In Readme of tutor-indigo plugin and was able to change the logo without any errors

jjdeezy18 commented 6 months ago

Hi,

We just re-installed tutor to make this work.

Thank you!