Troubleshooting
February 9, 2026 · View on GitHub
Quick Fixes
"Input is in lab format — conversion required"
Your data isn't in standard format. The tool can auto-convert if you specify a converter:
python src/main.py --input_json your_file.json --convertor lab
If that doesn't work, check whether your JSON has Version/InputData keys (lab format) vs switch/vlans keys (standard format).
"Template folder not found"
The tool can't find templates that match your switch's make/firmware.
- Check you're running from the project root
- Verify the folder exists:
input/jinja2_templates/<make>/<firmware>/ - Check your JSON has matching values:
{ "switch": { "make": "cisco", "firmware": "nxos" } }
"No configs generated" or empty output
- Vendor/firmware mismatch —
makeandfirmwaremust match a template folder name - Empty data — if no VLANs in input, no VLAN config is generated
- Missing templates — check that the folder contains
.j2files
"Failed to parse JSON"
Common JSON syntax errors:
Missing commas: {"key1": "v1" "key2": "v2"} ← needs comma
Trailing commas: {"key": "value",} ← remove trailing comma
Single quotes: {'key': 'value'} ← use double quotes
Comments: {"key": "value" // note} ← JSON doesn't allow comments
Validate with: python -m json.tool your_file.json
Permission errors
# Linux — ensure output folder is writable
mkdir -p output/ && chmod 755 output/
# Windows — run from a folder you own, or as Administrator
Debug Steps
1. Test with the included example
python src/main.py --input_json input/standard_input.json --output_folder test_output/
2. Check generated files
ls -la test_output/
# Should see: generated_*.cfg files
3. Examine the standard JSON
If using a converter, look at the intermediate std_*.json files to verify the conversion.
4. Enable debug logging
python src/main.py --input_json data.json --output_folder out/ --debug
5. Run tests
python -m pytest tests/ -v
Template Rendering Errors
Undefined variable:
{# Use safe access #}
{{ interface.mtu | default(1500) }}
{% if interface.mtu is defined %}
mtu {{ interface.mtu }}
{% endif %}
Missing endfor/endif:
Every {% for %} needs {% endfor %}, every {% if %} needs {% endif %}.
Debug data in templates:
<!-- DEBUG -->
{{ vlans | pprint }}
Executable Issues
Linux — "command not found":
chmod +x ./network_config_generator
./network_config_generator --help
Windows — "cannot execute":
- Right-click → Properties → General → Unblock
- Run from PowerShell:
.\network_config_generator.exe --help
Getting Help
Before reporting an issue:
- Check this guide and test with sample data
- Validate your JSON syntax
- Verify template folder structure
When reporting, include:
- Command used and full error message
- Input file structure (sanitized)
- OS and Python version
- Expected vs actual behavior