Build failed running pavelib.assets.update_assets: Subprocess return code: 1 in Open edX Koa

I am getting an error while compiling the theme changes for Open Edx Koa, the command used for theme compilation is:paver update_assets lms --settings=production

further is used the command:
python manage.py lms --settings=production print_setting STATIC_ROOT
to find the actual cause of the error and I found this:

2022-03-16 08:55:33,777 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/newrelic/console.py:84: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
  prototype = wrapper.__name__[3:] + ' ' + inspect.formatargspec(

2022-03-16 08:55:35,064 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/importlib/__init__.py:127: DeprecatedEdxPlatformImportWarning: Importing util instead of common.djangoapps.util is deprecated
  return _bootstrap._gcd_import(name[level:], package, level)

2022-03-16 08:55:35,066 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/importlib/__init__.py:127: DeprecatedEdxPlatformImportWarning: Importing util.memcache instead of common.djangoapps.util.memcache is deprecated
  return _bootstrap._gcd_import(name[level:], package, level)

2022-03-16 08:55:35,844 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/social_core/utils.py:56: DeprecatedEdxPlatformImportWarning: Importing third_party_auth instead of common.djangoapps.third_party_auth is deprecated
  __import__(name)

2022-03-16 08:55:35,845 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/social_core/utils.py:56: DeprecatedEdxPlatformImportWarning: Importing third_party_auth.appleid instead of common.djangoapps.third_party_auth.appleid is deprecated
  __import__(name)

2022-03-16 08:55:35,845 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/social_core/utils.py:56: DeprecatedEdxPlatformImportWarning: Importing third_party_auth.identityserver3 instead of common.djangoapps.third_party_auth.identityserver3 is deprecated
  __import__(name)

2022-03-16 08:55:35,846 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/social_core/utils.py:56: DeprecatedEdxPlatformImportWarning: Importing third_party_auth.saml instead of common.djangoapps.third_party_auth.saml is deprecated
  __import__(name)

2022-03-16 08:55:35,847 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/social_core/utils.py:56: DeprecatedEdxPlatformImportWarning: Importing third_party_auth.lti instead of common.djangoapps.third_party_auth.lti is deprecated
  __import__(name)

2022-03-16 08:55:35,948 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango30Warning: The DEFAULT_CONTENT_TYPE setting is deprecated.
  setattr(self, attr, getattr(obj, attr))

2022-03-16 08:55:35,949 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sorl/thumbnail/conf/__init__.py:16: RemovedInDjango31Warning: The FILE_CHARSET setting is deprecated. Starting with Django 3.1, all files read from disk must be UTF-8 encoded.
  setattr(self, attr, getattr(obj, attr))

2022-03-16 08:55:36,031 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/enterprise/utils.py:63: DeprecatedEdxPlatformImportWarning: Importing student instead of common.djangoapps.student is deprecated
  from student.api import (

2022-03-16 08:55:36,032 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/enterprise/utils.py:63: DeprecatedEdxPlatformImportWarning: Importing student.api instead of common.djangoapps.student.api is deprecated
  from student.api import (

2022-03-16 08:55:36,033 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/enterprise/utils.py:74: DeprecatedEdxPlatformImportWarning: Importing third_party_auth.provider instead of common.djangoapps.third_party_auth.provider is deprecated
  from third_party_auth.provider import Registry  # pylint: disable=unused-import

2022-03-16 08:55:36,033 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/enterprise/utils.py:81: DeprecatedEdxPlatformImportWarning: Importing track instead of common.djangoapps.track is deprecated
  from track import segment

2022-03-16 08:55:36,220 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/enterprise/admin/forms.py:35: DeprecatedEdxPlatformImportWarning: Importing third_party_auth.models instead of common.djangoapps.third_party_auth.models is deprecated
  from third_party_auth.models import SAMLProviderConfig as saml_provider_configuration

2022-03-16 08:55:36,479 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/enterprise/signals.py:40: DeprecatedEdxPlatformImportWarning: Importing student.models instead of common.djangoapps.student.models is deprecated
  from student.models import CourseEnrollment

2022-03-16 08:55:38,364 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/poll/poll.py:56: DeprecatedEdxPlatformImportWarning: Importing static_replace instead of common.djangoapps.static_replace is deprecated
  from static_replace import replace_static_urls

2022-03-16 08:55:38,390 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/specifiers.py:273: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
  warnings.warn(

2022-03-16 08:55:38,450 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py:111: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
  warnings.warn(

2022-03-16 08:55:38,478 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/staff_graded/staff_graded.py:27: DeprecatedEdxPlatformImportWarning: Importing course_modes instead of common.djangoapps.course_modes is deprecated
  from course_modes.models import CourseMode

2022-03-16 08:55:38,479 WARNING 14637 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/staff_graded/staff_graded.py:27: DeprecatedEdxPlatformImportWarning: Importing course_modes.models instead of common.djangoapps.course_modes.models is deprecated
  from course_modes.models import CourseMode

/edx/var/edxapp/staticfiles

Hi @mahesh1b!
Those warnings shouldn’t be a problem. I don’t see any error message. Did you get a stack trace in the command?
Did it work before or is it the first time you run this?
Btw, I encourage you to move to the latest versions, Maple or Lilac to have better support!

Hi @andres
I was trying to recompile the theme which I copied from the juniper version since then I am facing this error and the CSS changes are not being reflected.
Can you please tell me more about the stack trace? (How to check it? , any resource about the stack trace?)
Thanks :slightly_smiling_face:

Hi @mahesh1b ,

Try adding -d option to the paver command to enable debugging.
Looks like the problem is in compiling sass. You can try paver compile_sass lms --settings=production -d. This will compile only the lms and cms assets. If you are using comprehensive themes, you can add --themes=<theme directory> to compile one by one and check which one has problems.

1 Like

Hi @andres
I was able to execute the paver compile_sass lms --settings=production command without the -d and --themes= parameter


And here is the output of command

Captured Task Output:
---------------------

---> pavelib.assets.compile_sass
mkdir_p path('/edx/app/edxapp/edx-platform/themes/QBS/bdu-portal/lms/static/css')
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/paver/tasks.py", line 201, in _run_task
    return do_task()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/paver/tasks.py", line 198, in do_task
    return func(**kw)
  File "/edx/app/edxapp/edx-platform/pavelib/utils/timer.py", line 40, in timed
    return wrapped(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/pavelib/assets.py", line 472, in compile_sass
    is_successful = _compile_sass(
  File "/edx/app/edxapp/edx-platform/pavelib/assets.py", line 557, in _compile_sass
    sass.compile(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sass.py", line 635, in compile
    s, v = compile_dirname(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/sass.py", line 222, in compile_dirname
    with open(output_filename, 'w',
PermissionError: [Errno 13] Permission denied: '/edx/app/edxapp/edx-platform/themes/QBS/bdu-portal/lms/static/css/lms-course-rtl.css'

Build failed: Subprocess return code: 1

Looks like you have a permission problem. When you created the themes folder did you use sudo? Try changing the owner and group of the themes directory to edxapp.

Hi @andres, the issue was due to the file permissions, I have changed the owner of the theme folder to the edxapp now the CSS changes are reflected. Thank you so much for the help :slightly_smiling_face:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.