This document outlines common issues encountered during the execution of the long-term security program lab and their respective solutions.
Error message such as:
json.decoder.JSONDecodeError: Expecting ',' delimiter
- Missing comma
- Incorrect bracket placement
- Invalid quotation marks
- Trailing comma in JSON file
Validate JSON syntax:
python3 -m json.tool config/program_config.jsonIf validation fails:
- Check all
{}and[]are properly closed - Ensure double quotes are used (not single quotes)
- Remove trailing commas
Strategy report not found. Run strategy_engine.py first.
project_planner.py executed before strategy_engine.py.
Run in correct order:
python3 scripts/strategy_engine.py
python3 scripts/project_planner.pyProject plan JSON invalid.
Corrupted or manually modified project_plan.json.
Regenerate the project plan:
rm reports/project_plan.json
python3 scripts/project_planner.pyMetrics history not found. Run monitoring_system.py first.
automated_reporting.py executed before monitoring system generated metrics.
Execute:
python3 scripts/monitoring_system.py
python3 scripts/automated_reporting.pyModuleNotFoundError: No module named 'pandas'
Required Python libraries not installed.
Install dependencies:
pip3 install pandas matplotlibVerify installation:
python3 -c "import pandas, matplotlib"Permission denied
Script not executable.
Make script executable:
chmod +x scripts/<script_name>.pyExample:
chmod +x scripts/strategy_engine.pyFiles not found even though they exist.
Script executed from wrong directory causing relative path issues.
Always execute from project root:
cd ~/security_program
python3 scripts/project_planner.pyMetrics appear unrealistic (e.g., incident_count too high).
Random number simulation used for lab purposes.
Modify random ranges inside:
random.randint(min, max)Or replace with realistic data from actual incident logs.
No PNG files created in charts folder.
- Matplotlib backend issue
- Incorrect metrics_history.csv format
- No data records
Verify:
ls data/metrics_history.csvEnsure file contains records.
If necessary:
python3 scripts/monitoring_system.py
python3 scripts/automated_reporting.pyIncorrect timeline calculations.
Improper date format or manual edit in configuration.
Ensure format:
YYYY-MM-DD
Example:
"start_date": "2024-01-01"Missing config/program_config.json
Configuration file not present.
Ensure:
ls config/program_config.jsonIf missing, recreate configuration file.
- Never store real production credentials inside configuration files.
- Do not expose generated reports publicly if they contain sensitive organizational metrics.
- Ensure proper file permissions when deploying similar frameworks in real environments.
Before considering the lab complete, verify:
✔ strategy_report.json exists
✔ project_plan.json exists
✔ task_list.csv created
✔ metrics_history.csv populated
✔ status_report.json generated
✔ Charts present inside automated_reports/charts/
✔ governance_framework.json created
Most issues in this lab are related to:
- Execution order
- Missing dependencies
- Incorrect file paths
- JSON formatting errors
Following proper script execution order and validating JSON files resolves 90% of encountered issues.
Lab 19 troubleshooting completed successfully.