{"id":24140,"library":"olxcleaner","title":"olxcleaner","description":"Tool to scan Open edX courses in OLX format for various errors and inconsistencies. Current version 0.3.0, released Apr 2022. Maintenance mode.","status":"active","version":"0.3.0","language":"python","source_language":"en","source_url":"https://github.com/openedx/olxcleaner","tags":["openedx","olx","course-validation","lms","edx"],"install":[{"cmd":"pip install olxcleaner","lang":"bash","label":"Standard install"}],"dependencies":[],"imports":[{"note":"CourseValidator is in the validator module, not at package level.","wrong":"from olxcleaner import CourseValidator","symbol":"CourseValidator","correct":"from olxcleaner.validator import CourseValidator"},{"note":"Top-level convenience function available since 0.2.1.","symbol":"validate","correct":"from olxcleaner import validate"}],"quickstart":{"code":"from olxcleaner import validate\nfrom olxcleaner.validator import CourseValidator\n\n# Run validation on a course export directory\nerrors = validate('/path/to/course/olx')\nfor error in errors:\n    print(error)\n\n# Or use the validator class for more control\nvalidator = CourseValidator()\nvalidator.load('/path/to/course/olx')\nresult = validator.validate()\nprint(result)","lang":"python","description":"Validate an Open edX course OLX export for errors."},"warnings":[{"fix":"Ensure the input is a valid Open edX OLX course directory (e.g., extracted from a .tar.gz export).","message":"The package is designed for Open edX OLX exports, not for general XML. It expects the specific structure of an Open edX course tarball (course.xml, policies, etc.).","severity":"gotcha","affected_versions":"all"},{"fix":"Use CourseValidator.validate() which returns a list of Error objects.","message":"The validate() function prints errors to stderr by default; it does not return a list. To get a list, use CourseValidator explicitly.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.6 or newer.","message":"Python 3.6 is the minimum supported version; older Python versions will fail to install.","severity":"deprecated","affected_versions":"0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install olxcleaner","cause":"olxcleaner not installed.","error":"ModuleNotFoundError: No module named 'olxcleaner'"},{"fix":"Use: from olxcleaner.validator import CourseValidator","cause":"Incorrect import path; CourseValidator is not at package level.","error":"AttributeError: module 'olxcleaner' has no attribute 'CourseValidator'"},{"fix":"Provide the path to the root directory of the course OLX export, which should contain course.xml.","cause":"The input path does not contain a valid Open edX OLX course (missing course.xml).","error":"FileNotFoundError: [Errno 2] No such file or directory: 'course.xml'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}