Title: Fatal error: Uncaught Rubix\ML\Exceptions\RuntimeException
Last modified: September 5, 2024

---

# Fatal error: Uncaught Rubix\ML\Exceptions\RuntimeException

 *  Resolved [marafa86](https://wordpress.org/support/users/marafa86/)
 * (@marafa86)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/)
 * Dear,
 * I have a problem in website
 * (Fatal error: Uncaught Rubix\ML\Exceptions\RuntimeException: Estimator has not
   been trained. in /public_html/wp-content/plugins/no-unsafe-inline/vendor/rubix/
   ml/src/Classifiers/KNearestNeighbors.php:208 Stack trace: #0 /public_html/wp-
   content/plugins/no-unsafe-inline/src/Nunil_Manipulate_DOM.php(985): Rubix\ML\
   Classifiers\KNearestNeighbors->predict() #1 /public_html/wp-content/plugins/no-
   unsafe-inline/src/Nunil_Manipulate_DOM.php(416): NUNIL\Nunil_Manipulate_DOM->
   check_cluster_whitelist() #2 /public_html/wp-content/plugins/no-unsafe-inline/
   src/Nunil_Manipulate_DOM.php(302): NUNIL\Nunil_Manipulate_DOM->allow_inline()#
   3 /public_html/wp-content/plugins/no-unsafe-inline/src/Nunil_Manipulate_DOM.php(
   273): NUNIL\Nunil_Manipulate_DOM->manipulate_inline_scripts() #4 /public_html/
   wp-content/plugins/no-unsafe-inline/public/class-no-unsafe-inline-public.php(
   201): NUNIL\Nunil_Manipulate_DOM->get_local_csp() #5 /public_html/wp-includes/
   class-wp-hook.php(324): No_Unsafe_Inline_Public->filter_final_output() #6 /public_html/
   wp-includes/plugin.php(205): WP_Hook->apply_filters() #7 /public_html/wp-content/
   mu-plugins/no-unsafe-inline-output-buffering.php(46): apply_filters() #8 /public_html/
   wp-includes/class-wp-hook.php(324): {closure}() #9 /public_html/wp-includes/class-
   wp-hook.php(348): WP_Hook->apply_filters() #10 /public_html/wp-includes/plugin.
   php(517): WP_Hook->do_action() #11 /public_html/wp-includes/load.php(1280): do_action()#
   12 [internal function]: shutdown_action_hook() #13 {main} thrown in /public_html/
   wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/src/Classifiers/KNearestNeighbors.
   php on line 208)
 * and when deactivate plugin website work good. can you support me ?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-uncaught-rubixmlexceptionsruntimeexception%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Giuseppe](https://wordpress.org/support/users/mociofiletto/)
 * (@mociofiletto)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/#post-18004114)
 * Please, explain the steps you have done when this issue appears and check if 
   the upload dir is writable.
 *  Thread Starter [marafa86](https://wordpress.org/support/users/marafa86/)
 * (@marafa86)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/#post-18004314)
 * When I update PHP from 7.4 to 8.2 this error appeared, now I downgrade php from
   8.2 to 8 , Working fine.
 *  Plugin Author [Giuseppe](https://wordpress.org/support/users/mociofiletto/)
 * (@mociofiletto)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/#post-18005737)
 * Thanks for your answer [@marafa86](https://wordpress.org/support/users/marafa86/).
 * The plugin is tested with PHP8.2 (even if the tests don’t cover the 100% of the
   code).
 * I think that you miss a PHP extension needed whit PHP 8.2; if your hosting provider
   uses cpanel, you can easily check this.
 * Here you can see all extensions needed by the plugin, and you can see that with
   PHP 8.2 the **random **extension is needed (and this extensions is not needed
   with PHP 7.4 and 8.0):
 * [https://github.com/MocioF/No-unsafe-inline/blob/cf346e6fa7ea5fa929e77366e246600026e54a30/includes/class-no-unsafe-inline-activator.php#L308-L345](https://github.com/MocioF/No-unsafe-inline/blob/cf346e6fa7ea5fa929e77366e246600026e54a30/includes/class-no-unsafe-inline-activator.php#L308-L345)
 * Please, let me know if enabling random (and all the other extensions listed in
   the code), the issue is solved.
 *  Thread Starter [marafa86](https://wordpress.org/support/users/marafa86/)
 * (@marafa86)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/#post-18034683)
 * Update to 8.2 and add PHP extension and website worked fine .
 * Than you very much
    -  This reply was modified 1 year, 8 months ago by [marafa86](https://wordpress.org/support/users/marafa86/).
 *  [0oxkey](https://wordpress.org/support/users/0oxkey/)
 * (@0oxkey)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/#post-18117763)
 * Hello, i have a similar issue, I activated the plugin, then enabled CSP protection,
   and my site went down immediately displaying error. I had PHP 8.3, i then downgrade
   it to 8.2 just to see if it would come back, but still can’t access WP backed
   or anything anymore, Please help
 * **Fatal error**: Uncaught Rubix\ML\Exceptions\RuntimeException: Estimator has
   not been trained. in /home
 *  Plugin Author [Giuseppe](https://wordpress.org/support/users/mociofiletto/)
 * (@mociofiletto)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/#post-18207463)
 * sorry [@0oxkey](https://wordpress.org/support/users/0oxkey/) I missed your message.
   Please if you still have any issue with the plugin, start another topic and don’t
   use closed ones.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Fatal error: Uncaught Rubix\ML\Exceptions\RuntimeException’ is closed
to new replies.

 * ![](https://ps.w.org/no-unsafe-inline/assets/icon-256x256.png?rev=2699768)
 * [No unsafe-inline](https://wordpress.org/plugins/no-unsafe-inline/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/no-unsafe-inline/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/no-unsafe-inline/)
 * [Active Topics](https://wordpress.org/support/plugin/no-unsafe-inline/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/no-unsafe-inline/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/no-unsafe-inline/reviews/)

## Tags

 * [CSP](https://wordpress.org/support/topic-tag/csp/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 6 replies
 * 3 participants
 * Last reply from: [Giuseppe](https://wordpress.org/support/users/mociofiletto/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-rubixmlexceptionsruntimeexception/#post-18207463)
 * Status: resolved