krayin/laravel-crm · error · LogicException
Unable to open file: '{$filePath}'
Error message
Unable to open file: '{$filePath}' What it means
Error "Unable to open file: '{$filePath}'" thrown in krayin/laravel-crm.
Source
Thrown at packages/Webkul/DataTransfer/src/Helpers/Sources/Excel.php:39
/**
* Create a new helper instance.
*
* @return void
*/
public function __construct(string $filePath)
{
try {
$factory = IOFactory::load(Storage::disk('public')->path($filePath));
$this->reader = $factory->getActiveSheet();
$highestColumn = $this->reader->getHighestColumn();
$this->totalColumns = Coordinate::columnIndexFromString($highestColumn);
$this->columnNames = $this->getNextRow();
} catch (\Exception $e) {
throw new \LogicException("Unable to open file: '{$filePath}'");
}
}
/**
* Read next line from csv.
*/
protected function getNextRow(): array|bool
{
for ($column = 1; $column <= $this->totalColumns; $column++) {
$rowData[] = $this->reader->getCellByColumnAndRow($column, $this->currentRowNumber)->getValue();
}
$filteredRowData = array_filter($rowData);
if (empty($filteredRowData)) {
return false;
}
View on GitHub (pinned to 13d6988cda)
When it happens
Trigger: Thrown at packages/Webkul/DataTransfer/src/Helpers/Sources/Excel.php:39 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of krayin/laravel-crm@13d6988cda (2026-08-17).
Data as JSON: /api/errors/f50b34c188e33169.
Report an issue: GitHub.