Script to generate pages – taxonomies not loaded

Probably just use the taxonomy call within wordpress action callback function.

add_action('init', 'my_callback_func');
 function my_callback_func() {

//here you can place your get terms 

}