octobercms/october · error · SystemException
{$path}: failed to open stream for export: No such file or d
Error message
{$path}: failed to open stream for export: No such file or directory. What it means
Error "{$path}: failed to open stream for export: No such file or directory." thrown in octobercms/october.
Source
Thrown at modules/backend/models/exportmodel/EncodesCsv.php:125
}
// Add records
foreach ($results as $result) {
$data = $this->matchDataToColumns($result, $columns);
$csv->insertOne($data);
}
// Output
if ($options['useOutput']) {
$csv->output($options['fileName']);
return;
}
// Save to file
if ($path = $options['savePath']) {
$resource = @fopen($path, 'w+');
if (!is_resource($resource)) {
throw new SystemException("{$path}: failed to open stream for export: No such file or directory.");
}
foreach ($csv->chunk(8192) as $chunk) {
fwrite($resource, $chunk);
}
fclose($resource);
return;
}
return $csv->toString();
}
}
View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/backend/models/exportmodel/EncodesCsv.php:125 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/7676ce0678b0c4fe.
Report an issue: GitHub.