MeshLibrary.get_item_preview()
relies on a preview being added to the MeshLibrary using MeshLibrary.set_item_preview()
. However, this method is only called in an editor context, which means the preview won't be available in a running project. I'll add an error message and update the documentation to reflect this.
To generate static renderings of GridMap tiles, look into using Viewports and render-to-texture functionality (or create them in advance using a script or external program like Blender).