Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing fresh XBlock with mentioned approach failes #1106

Open
CodeWithEmad opened this issue Aug 3, 2024 · 0 comments
Open

Installing fresh XBlock with mentioned approach failes #1106

CodeWithEmad opened this issue Aug 3, 2024 · 0 comments

Comments

@CodeWithEmad
Copy link
Member

As a part of updating XBlock documentation, I created a simple xblock using edx-cookiecutters with a --no-input flag to test the xblock installation. Mounted the xblock using tutor mounts add /home/emad/Desktop/my-xblock, and checked the mounted path:

(.venv) ➜  quince.3 tutor mounts list

- name: /home/emad/Desktop/my-xblock
  build_mounts:
  - image: openedx
    context: mnt-my-xblock
  - image: openedx-dev
    context: mnt-my-xblock
  compose_mounts:
  - service: openedx
    container_path: /mnt/my-xblock
  - service: openedx-dev
    container_path: /mnt/my-xblock

I collected strings and compiled messages

make extract_translations
cd my_xblock && i18n_tool generate

Here is my local directory

.venv➜  conf tree                           
.
└── locale
    ├── config.yaml
    ├── en
    │   └── LC_MESSAGES
    │       ├── text.mo
    │       └── text.po
    └── __init__.py

3 directories, 4 files

And a translation directory is linked to this directory.
After I run tutor images build opened-dev, following error will raise:

6.033 python manage.py lms --settings=tutor.assets collectstatic --noinput > /dev/null
9.647 Traceback (most recent call last):
9.647   File "manage.py", line 106, in <module>
9.647     execute_from_command_line([sys.argv[0]] + django_args)
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
9.647     utility.execute()
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 436, in execute
9.647     self.fetch_command(subcommand).run_from_argv(self.argv)
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
9.647     self.execute(*args, **cmd_options)
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
9.647     output = self.handle(*args, **options)
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
9.647     collected = self.collect()
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 135, in collect
9.647     handler(path, prefixed_path, storage)
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 377, in copy_file
9.647     with source_storage.open(path) as source_file:
9.647   File "/openedx/edx-platform/openedx/core/lib/xblock_pipeline/finder.py", line 72, in open
9.647     return FileSystemStorage(path).open(path, mode)
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/core/files/storage/base.py", line 22, in open
9.647     return self._open(name, mode)
9.647   File "/openedx/venv/lib/python3.8/site-packages/django/core/files/storage/filesystem.py", line 68, in _open
9.647     return File(open(self.path(name), mode))
9.647 FileNotFoundError: [Errno 2] No such file or directory: '/mnt/my-xblock/my_xblock/translation'
10.16 Traceback (most recent call last):
10.16   File "/openedx/bin/openedx-assets", line 218, in <module>
10.16     main()
10.16   File "/openedx/bin/openedx-assets", line 89, in main
10.16     args.func(args)
10.16   File "/openedx/bin/openedx-assets", line 157, in run_collect
10.16     assets.collect_assets(args.systems, args.settings)
10.16   File "/openedx/edx-platform/pavelib/assets.py", line 606, in collect_assets
10.16     sh(django_cmd(sys, settings, "collectstatic --noinput {logfile_str}".format(
10.16   File "/openedx/venv/lib/python3.8/site-packages/paver/shell.py", line 60, in sh
10.16     return dry(command, runpipe)
10.16   File "/openedx/venv/lib/python3.8/site-packages/paver/easy.py", line 15, in dry
10.16     return func(*args, **kw)
10.16   File "/openedx/venv/lib/python3.8/site-packages/paver/shell.py", line 55, in runpipe
10.16     raise BuildFailure("Subprocess return code: %d" % p.returncode)
10.16 paver.tasks.BuildFailure: Subprocess return code: 1

After this, I removed the translation soft link, created a new directory with the same name, and put the contents of locale inside it and the build worked like a charm. My guess is the soft link is not mounted
@kdmccormick you've worked with mounts before. any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant