Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error after choosing file #34

Closed
kimisgold opened this issue Apr 26, 2016 · 2 comments
Closed

Runtime error after choosing file #34

kimisgold opened this issue Apr 26, 2016 · 2 comments
Labels

Comments

@kimisgold
Copy link
Contributor

On the develop branch, after selecting a csv file and clicking the 'Next' button, I received the following runtime error:

There was an error.
​
exception 'RuntimeException' with message 'Cannot read from file /private/var/tmp/omekamtNK3T' in /Users/kim/Sites/omeka-s/modules/CSVImport/src/CsvFile.php:22
Stack trace:
#0 /Users/kim/Sites/omeka-s/modules/CSVImport/src/CsvFile.php(22): SplFileObject->fgets()
#1 /Users/kim/Sites/omeka-s/modules/CSVImport/src/Controller/IndexController.php(50): CSVImport\CsvFile->isUtf8()
#2 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): CSVImport\Controller\IndexController->mapAction()
#3 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#4 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#5 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#6 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#7 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#8 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#9 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#10 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /Users/kim/Sites/omeka-s/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#12 /Users/kim/Sites/omeka-s/index.php(17): Zend\Mvc\Application->run()
#13 {main}
@kimisgold kimisgold added the bug label Apr 26, 2016
@kimisgold
Copy link
Contributor Author

I asked @zerocrates to look at the issue, and adding $this->fileObject->rewind(); at line 22 of src/CsvFile.php seemed to fix it, though he mentioned he's not sure why the problem was happening in the first place.

@patrickmj
Copy link
Contributor

I do love a good mystery!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants