SubtitleEdit/subtitleedit · error · FileNotFoundException
Settings file not found: {path}
Error message
Settings file not found: {path} What it means
Thrown by SeConvSettings.Load when the settings file path passed to it does not exist (File.Exists returns false). FileNotFoundException includes the path as both the message and the FileName so the caller can see exactly what was missing. This is the entry point for `--settings <path>` and validates the file before attempting JSON parsing.
Source
Thrown at src/seconv/Core/SeConvSettings.cs:46
[JsonPropertyName("profiles")]
public Dictionary<string, SeConvSettings>? Profiles { get; set; }
[JsonExtensionData]
public Dictionary<string, JsonElement>? UnknownMembers { get; set; }
private static readonly JsonSerializerOptions JsonOptions = new()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
PropertyNameCaseInsensitive = true,
ReadCommentHandling = JsonCommentHandling.Skip,
AllowTrailingCommas = true,
};
public static SeConvSettings Load(string path)
{
if (!File.Exists(path))
{
throw new FileNotFoundException($"Settings file not found: {path}", path);
}
using var stream = File.OpenRead(path);
return JsonSerializer.Deserialize<SeConvSettings>(stream, JsonOptions)
?? throw new InvalidDataException($"Settings file is empty or null: {path}");
}
/// <summary>
/// Serializes a complete settings file populated with the current libse defaults —
/// every key seconv understands, with its correct (camelCase) name and default value.
/// Backs <c>seconv dump-settings</c>, which users redirect to a file as a starting point
/// (issue #11037): it teaches the schema, so no one has to guess that the key is
/// <c>removeIfAllUppercase</c> and not the GUI's <c>IsRemoveTextUppercaseLineOn</c>.
/// <para>Built by mirroring <see cref="Configuration.Settings"/> (the same source
/// <see cref="ApplyBaseSections"/> writes back into) and a fresh <see cref="ImageExportStyle"/>,
/// so the output round-trips through <see cref="Load"/> with zero unknown keys — the dump
/// can never drift from what the loader accepts.</para>
/// </summary>View on GitHub (pinned to 17a9f07487)
Solutions
- Pass an absolute path to --settings.
- Generate a starting file with `seconv dump-settings > settings.json`.
- Verify the path with `ls`/`Test-Path` before running seconv.
- Check quoting in the shell — unquoted paths with spaces may be split.
Example fix
# before seconv in.srt out.srt --settings=settings.json # not in cwd # after seconv in.srt out.srt --settings=/home/user/seconv/settings.json
Defensive patterns
Strategy: validation
Validate before calling
if (!File.Exists(path))
throw new ArgumentException("Settings file not found: " + path);
var settings = SeConvSettings.Load(path); Type guard
static bool SettingsFileExists(string? p) =>
!string.IsNullOrWhiteSpace(p) && File.Exists(p); Try / catch
try { var s = SeConvSettings.Load(path); }
catch (FileNotFoundException ex) when (ex.FileName == path)
{
// generate defaults, or abort with the missing path
} Prevention
- Resolve --settings to an absolute path before loading.
- Run `seconv dump-settings > settings.json` to bootstrap a valid file.
- Verify with File.Exists in your startup checks.
When it happens
Trigger: Calling `SeConvSettings.Load(path)` (via `--settings=/path/to/settings.json`) where the path is wrong, relative to a different working directory, or the file was never created.
Common situations: Typoing the --settings path; relative path resolved against the wrong cwd; the file lives in a different user profile; a deploy step that copies settings was skipped.
Related errors
- BinaryOCR database not found: {dbPath}. Use --ocr-db to poin
- nOCR database not found: {nOcrDbPath}. Use --ocr-db to point
- Settings file is empty or null: {path}
- Profile '{profileName}' not found in settings. Available: {a
- llama.cpp model not found - please download a model first.
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/8792e2a871d833ab.
Report an issue: GitHub.