I’d be grateful for any advice! I’ve installed the Ngram plugin and everything seems to be working up to the point when I try to generate unigrams/bigrams/trigrams. The items validate fine, the pool/corpus look correct, but I just get an error when I try to generate them. The button doesn’t grey out to show it’s working, the page just loads for a minute or so and goes straight to an error message. I’ve tried selecting a smaller corpus to test it (since there’s a lot of text in the corpus I want) but it still doesn’t work.
Does anyone have any advice? Is it likely to be a size issue? Is there a limit on the number of words the plugin can handle? Or might there be any characters in the text field that are causing errors? I can’t think of anything else…
Thanks for replying. It’s Omeka 3.0.2 and Ngram 1.2. It just says “Omeka has encountered an error”. I’ve turned on the error messages and nothing else comes up. I have the error log enabled but it’s not updating for this (it works, it records other things, but nothing for this…).
The error log did record some issues as I was trying to sort this last night, but I don’t know if these are relating to the generating of the uni/bi/trigrams specifically, as I tried a few different things to fix it and might have been doing something else (I’m out of my depth here). But just in case this clarifies anything!
[16-Mar-2022 02:43:16 UTC] PHP Fatal error: Uncaught Error: Call to a member function getElementSet() on null in /home/histor47/public_html/plugins/Ngram/views/shared/corpora/browse.php:30
Stack trace: #0 /home/histor47/public_html/application/libraries/Omeka/View.php(114): include() #1 /home/histor47/public_html/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run(‘/home/histor47/…’) #2 /home/histor47/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(NULL) #3 /home/histor47/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript(‘corpora/browse…’, NULL) #4 /home/histor47/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render() #5 /home/histor47/public_html/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #6 /home/histor47/pu in /home/histor47/public_html/plugins/Ngram/views/shared/corpora/browse.php on line 30
[16-Mar-2022 02:43:30 UTC] PHP Fatal error: Uncaught Error: Call to a member function getElementSet() on null in /home/histor47/public_html/plugins/Ngram/views/shared/corpora/browse.php:30
Stack trace: #0 /home/histor47/public_html/application/libraries/Omeka/View.php(114): include() #1 /home/histor47/public_html/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run(‘/home/histor47/…’) #2 /home/histor47/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(NULL) #3 /home/histor47/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript(‘corpora/browse…’, NULL) #4 /home/histor47/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render() #5 /home/histor47/public_html/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #6 /home/histor47/pu in /home/histor47/public_html/plugins/Ngram/views/shared/corpora/browse.php on line 30
[16-Mar-2022 02:50:34 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/histor47/public_html/plugins/Ngram/views/shared/corpora/show.php on line 22
[16-Mar-2022 02:50:45 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/histor47/public_html/plugins/Ngram/views/shared/corpora/show.php on line 22
The error log you posted from that shows those “PHP Fatal error” lines, that’s PHP’s error log.
Omeka has its own error log that stores in a different location (application/logs/errors.log within the Omeka folder) and is enabled by those linked instructions.
Any “Omeka has encountered an error” page should be logged in the Omeka error log.