anthropics/skills · info · RuntimeError
This module should not be run directly.
Error message
This module should not be run directly.
What it means
redlining.py is a library module of the office validators package; executing it as a script hits the __main__ guard and raises RuntimeError at once. Its tracked-change ('redline') extraction helpers are intended for import only.
Source
Thrown at skills/xlsx/scripts/office/validators/redlining.py:299
def _extract_text_content(self, root):
p_tag = f"{{{self.namespaces['w']}}}p"
t_tag = f"{{{self.namespaces['w']}}}t"
paragraphs = []
for p_elem in root.findall(f".//{p_tag}"):
text_parts = []
for t_elem in p_elem.findall(f".//{t_tag}"):
text_parts.append(self._rendered_text(t_elem))
paragraph_text = "".join(text_parts)
if paragraph_text:
paragraphs.append(paragraph_text)
return "\n".join(paragraphs)
if __name__ == "__main__":
raise RuntimeError("This module should not be run directly.")
View on GitHub (pinned to f6656c1256)
Solutions
- Run the package entry-point script that imports redlining instead
- For exploration, import the module and call its classes from a short driver snippet
- Keep library modules out of execute-all automation
Example fix
# before python skills/xlsx/scripts/office/validators/redlining.py # after python -c "import sys; sys.path.insert(0, 'skills/xlsx/scripts/office'); from validators import redlining" # import-only
Defensive patterns
Strategy: try-catch
Try / catch
# Nothing to catch — import redlining from a driver instead of running the file.
Prevention
- Use the package driver script for any CLI workflow
- Keep execute-all harnesses away from the validators package
When it happens
Trigger: `python skills/xlsx/scripts/office/validators/redlining.py` from a shell; an IDE 'run current file'; a CI step that executes every discovered .py file.
Common situations: IDE run button; exploratory execution of files found via grep/glob; mistaken assumption that validators ship CLIs.
Related errors
- This module should not be run directly.
- This module should not be run directly.
- This module should not be run directly.
AI-assisted analysis of anthropics/skills@f6656c1256 (2026-08-14).
Data as JSON: /api/errors/b91533b0cb5d8737.
Report an issue: GitHub.