ufirstgroup / laravel-lang-import-export

A Laravel package providing artisan commands to import and export language files from and to CSV
MIT License
41 stars 40 forks source link

fopen failed to open stream: No such file or directory #18

Open smitexpert opened 1 year ago

smitexpert commented 1 year ago

at /var/www/html/paycell-backend/vendor/ufirst/lang-import-export/src/UFirst/LangImportExport/Console/ImportFromCsvCommand.php:71 67| $escape = $this->option('escape'); 68| 69| echo $file; 70| // Create output device and write CSV.

71| if (($input_fp = fopen($file, 'r')) === FALSE) { 72| $this->error('Can\'t open the input file!'); 73| } 74| 75| // Write CSV lintes

Exception trace:

1 fopen("bd.csv", "r") /var/www/html/paycell-backend/vendor/ufirst/lang-import-export/src/UFirst/LangImportExport/Console/ImportFromCsvCommand.php:71

2 UFirst\LangImportExport\Console\ImportFromCsvCommand::handle() /var/www/html/paycell-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32

Please use the argument -v to see more details.

lenssoft commented 1 year ago

Can you try it with the absolute path of the csv file to import?

smitexpert commented 1 year ago

Can you try it with the absolute path of the csv file to import?

Can you please review my pull request? It's will help us to understand where to put the file.