{"id":24846,"library":"xblocks-contrib","title":"xblocks-contrib","description":"A collection of XBlocks for the Open edX platform, including video, discussion, poll, HTML, problem, PDF, and other contributed blocks. Version 0.16.1 requires Python >=3.12. Active development with frequent releases, used inside Open edX installations.","status":"active","version":"0.16.1","language":"python","source_language":"en","source_url":"https://github.com/openedx/xblocks-contrib","tags":["xblock","openedx","video","discussion","poll","edx"],"install":[{"cmd":"pip install xblocks-contrib","lang":"bash","label":"latest"}],"dependencies":[{"reason":"Required runtime dependency for all XBlocks.","package":"XBlock","optional":false},{"reason":"Used for web framework integration, typically provided by Open edX.","package":"Django","optional":true}],"imports":[{"note":"Module name is 'video', not 'video_block'.","wrong":"from xblocks_contrib.video_block import VideoBlock","symbol":"VideoBlock","correct":"from xblocks_contrib.video import VideoBlock"},{"note":"Correct import path for the discussion block.","symbol":"DiscussionBlock","correct":"from xblocks_contrib.discussion import DiscussionBlock"},{"note":"Correct import path for the poll block.","symbol":"PollBlock","correct":"from xblocks_contrib.poll import PollBlock"}],"quickstart":{"code":"from xblocks_contrib.video import VideoBlock\nblock = VideoBlock()\nprint(block.display_name)","lang":"python","description":"Import and instantiate a VideoBlock to verify installation."},"warnings":[{"fix":"Use Python 3.12 or newer.","message":"Version 0.14.0 dropped Python 3.11 support; Python >=3.12 is required.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Replace any usage of legacy XModuleMixin attributes with the new XBlock API.","message":"Legacy XModuleMixin attributes were removed in 0.15.3 from Poll, Discussion, Annotatable, HTML, and Problem blocks.","severity":"deprecated","affected_versions":"0.15.3+"},{"fix":"Install with 'pip install xblocks-contrib' but import with 'import xblocks_contrib'.","message":"The package name uses underscores (xblocks_contrib) for Python imports, but the PyPI package uses a hyphen (xblocks-contrib).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from xblocks_contrib.video import VideoBlock'.","cause":"Wrong module name; correct module is 'video'.","error":"ModuleNotFoundError: No module named 'xblocks_contrib.video_block'"},{"fix":"Import from the specific submodule, e.g., 'from xblocks_contrib.video import VideoBlock'.","cause":"Attempted to import directly from the package root instead of the submodule.","error":"ImportError: cannot import name 'VideoBlock' from 'xblocks_contrib'"},{"fix":"Update your code to use the XBlock runtime API (e.g., self.runtime instead of self.xmodule_runtime).","cause":"Using legacy XModuleMixin attributes removed in version 0.15.3.","error":"AttributeError: 'VideoBlock' object has no attribute 'xmodule_runtime'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}