Skip to content

PRS001 - File Not Found

Description

The specified file path does not exist or is not accessible. This error occurs when attempting to validate a file that cannot be read.

Severity

Error

When This Occurs

  • File path provided to validate() does not exist
  • File has been moved or deleted
  • Insufficient permissions to read the file

Example

from dppvalidator import ValidationEngine

engine = ValidationEngine()
result = engine.validate("nonexistent.json")  # PRS001 error

Resolution

  1. Verify file exists:
from pathlib import Path

path = Path("document.json")
if path.exists():
    result = engine.validate(path)
else:
    print(f"File not found: {path}")
  1. Check file permissions:
ls -la document.json
  1. Use absolute path:
from pathlib import Path

path = Path("document.json").resolve()
result = engine.validate(path)