Pygmt.makecpt error (Module 'grdinfo' failed with status code 72:)

I have a problem at pygmt.makecpt
because of this error
I can’t do anything
please help me

  1. error message
GMTCLibError: Module 'grdinfo' failed with status code 72:
grdinfo [ERROR]: File /Users/prince_ha/Desktop/pyhton was not found
grdinfo [ERROR]: Cannot find file /Users/prince_ha/Desktop/pyhton
grdinfo [ERROR]: Cannot find file practice/fatiando
grdinfo [ERROR]: Cannot find file processing2/
grdinfo [ERROR]: Must specify one or more input files
  1. my topography data
    data’s name is topography

  1. pygmt.makecpt code
    fig = pygmt.Figure()
    pygmt.makecpt(cmap=“earth”, series=[topography.values.min(), topography.values.max()])
    fig.grdimage(topography, shading=True, projection=“M12c”, frame=True)
    fig.colorbar(frame=‘af+l"topography [m]"’)

this code make a error

thanks happy new year

Hello @prince-Ha,
welcome to the GMT forum and also a happy new year!

Thanks for providing your code. I feel it would be helpful, if you please can also provide your data as a file not only as a screenshot :slightly_smiling_face:. Currently, it is difficult to infer what is going wrong in detail.

You are writing you have problems with pygmt.makecpt, but the posted error message is more related to pygmt.grdinfo (, which is not explicitly used in your code below). Looking at the file paths, I am wondering whether they contain a typo:

grdinfo [ERROR]: File /Users/prince_ha/Desktop/pyhton  was not found 
# <- maybe a typo in "pyhton"  and it should be "python"?

Your code looks good to me so far. I complete your example using a remote dataset provided by GMT or PyGMT:

import pygmt

# Use the Earth relief grid provided by GMT or PyGMT as input data
# Load the default grid (gridline-registered 1 arc-degree grid) 
# in a xarray.DataArray
# For details please see the documentation at
topography = pygmt.datasets.load_earth_relief()

# Create new Figure object
fig = pygmt.Figure()

# Set up colormap for the elevation
              series=[topography.values.min(), topography.values.max()],

# Plot the elevation grid with color-coding
    projection="W12c",  # Mollweide projection
    # cmap=True,

# Add a colorbar for elevation grid
fig.colorbar(frame="+lelevation / m")

# fig.savefig(fname="makecpt_problem_GMTforum.png")

Output figure:

I’m sorry for the late reply because I didn’t know there was an answer. This problem was solved by using data from a uniform grid of gmt remote. Thank you. Happy new year.