in drupal 7, views_get_view('VIEWNAME') get a error?
Even thought the documentation for views_get_view() refers to $name as the name of the view, what the function wants is the machine name of the view.

You should always check the value returned from the function is not NULL, as the function doesn't return any value, if it doesn't find the view with that name.

  ctools_include('export');
  $view = ctools_export_crud_load('views_view', $name);
  if ($view) {
    $view-&gt;update();
    return $view-&gt;clone_view();
  }


views_embed_view(), for example, uses the following code.

  $view = views_get_view($name);
  if (!$view || !$view-&gt;access($display_id)) {
    return;
  }

  return $view-&gt;preview($display_id, $args);


You should use similar code, avoiding to call $view-&gt;access() if the view should always be visible, independently from the permission the currently logged-in user has. If you need to show the view only when the user has the permission to see it, then you should consider using views_embed_view().