"Unable to load XBlock" error

Hi @regis,
I’m the same issue but for another xblock called Xblock-video

When I did:

echo " git+https://github.com/appsembler/xblock-video.git@dev#egg=video_xblock " >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt"

And after:

tutor images build openedx

The output was

Unable to load XBlock 'video_xblock'
Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 141, in load_classes
    yield (class_.name, cls._load_class_entry_point(class_))
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 70, in _load_class_entry_point
    class_ = entry_point.load()
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2442, in load
    self.require(*args, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2465, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (XBlock 1.4.0 (/openedx/venv/lib/python3.8/site-packages), Requirement.parse('XBlock==1.3.1'))
Unable to load XBlock 'video_xblock'
Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 141, in load_classes
    yield (class_.name, cls._load_class_entry_point(class_))
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 70, in _load_class_entry_point
    class_ = entry_point.load()
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2442, in load
    self.require(*args, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2465, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (XBlock 1.4.0 (/openedx/venv/lib/python3.8/site-packages), Requirement.parse('XBlock==1.3.1'))
Unable to load XBlock 'video_xblock'
Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 141, in load_classes
    yield (class_.name, cls._load_class_entry_point(class_))
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 70, in _load_class_entry_point
    class_ = entry_point.load()
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2442, in load
    self.require(*args, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2465, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (XBlock 1.4.0 (/openedx/venv/lib/python3.8/site-packages), Requirement.parse('XBlock==1.3.1'))
Unable to load XBlock 'video_xblock'
Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 141, in load_classes
    yield (class_.name, cls._load_class_entry_point(class_))
  File "/openedx/venv/lib/python3.8/site-packages/xblock/plugin.py", line 70, in _load_class_entry_point
    class_ = entry_point.load()
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2442, in load
    self.require(*args, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2465, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/openedx/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (XBlock 1.4.0 (/openedx/venv/lib/python3.8/site-packages), Requirement.parse('XBlock==1.3.1'))

So, Xblock-video is unable

How can I fix it?

Thanks

(@emanueleferrara I moved your question to a separate topic, because it has nothing to do with that other one.)

The Video XBlock depends on version 1.3.1 of the XBlock package, while edx-platform requires version 1.4.0 in the Lilac release (see source code).

In other words: the Video XBlock is not compatible with the Lilac release. The last release that depended on version 1.3.1 of the XBlock package is Juniper. So the Video XBlock is late by at least two releases.

I suggest that you get in touch with the maintainers of the video xblock directly.