Acid XBlock

raw JSON →
0.4.1 verified Fri May 01 auth: no python

Acid XBlock is a test XBlock for the Open edX platform that stresses the XBlock API. It provides a comprehensive test of XBlock functionality including various field types, scopes, and runtime interactions. Current version: 0.4.1, released September 2024. Releases are irregular.

pip install acid-xblock
error ModuleNotFoundError: No module named 'acidxblock'
cause Incorrect import path: the module name uses underscores, not hyphens or concatenated words.
fix
Run: from acid_xblock import AcidBlock
error ImportError: cannot import name 'AcidBlock' from 'acid_xblock'
cause The class AcidBlock may not be available in older versions, or the package was installed but the wrong symbol is referenced.
fix
Ensure you are using version 0.4.0 or later, and check that the package is installed: pip show acid-xblock
breaking Version 0.4.0 dropped support for Python 3.8. If your environment uses Python 3.8, upgrade Python or pin to acid-xblock<0.4.0.
fix Upgrade to Python 3.9+ or use acid-xblock==0.3.1
gotcha The package name on PyPI is 'acid-xblock', but the Python module is 'acid_xblock'. Users often try to import 'acidxblock' or 'acid' directly.
fix Use 'from acid_xblock import AcidBlock' or 'import acid_xblock'.
deprecated The package 'acid-xblock' is a test XBlock and is not intended for production use. It may not receive security updates.
fix Do not rely on this package in production courses. Use only for development or testing.

Get the AcidBlock class. For actual usage, install the package and add 'acid' to the Advanced Module list in Studio course settings.

# Add to your Open edX environment
# Usually installed via requirements, then enabled in the advanced settings.
# To test in a Python shell (if inside an XBlock runtime context):
from acid_xblock import AcidBlock
print(AcidBlock.__name__)