Skip to content

In Windows 10 PyGMT version 0.18, the annotation %s appears. #4441

@q1165600785

Description

@q1165600785

Description of the problem

The same code works fine on an external Windows 11 machine, but causes %s errors on an internal Windows 10 machine.

Drawing with the native GMT tool on Windows 10 works fine. I'm pretty sure the problem lies with PyGMT, but I don't know what the problem is.

Image

Minimal Complete Verifiable Example

import  pygmt
print(pygmt.show_versions())
import  locale
print(locale.getlocale())

fig =pygmt.Figure()


region=[105,112,31,48]

fig.grdimage(grid="@earth_relief_04m_p",cmap='geo',shading=True,region=region)
fig.coast(borders='1/0.8p,black',shorelines='0.5p,black',frame=['xa1g1','ya1g1','WSNE'])

fig.savefig('biaozhu.png',dpi=300)

Full error message

No error message was reported, but there was definitely a problem with the display.

System information

Code configuration

PyGMT information:
  version: v0.18.0
System information:
  python: 3.13.11 | packaged by Anaconda, Inc. | (main, Dec 10 2025, 21:21:58) [MSC v.1929 64 bit (AMD64)]
  executable: C:\ProgramData\miniconda3\envs\py313zyj\python.exe
  machine: Windows-10-10.0.16299-SP0
Dependency information:
  numpy: 2.4.2
  pandas: 3.0.1
  xarray: 2025.11.0
  packaging: 25.0
  contextily: 1.7.0
  geopandas: 1.1.2
  IPython: 9.10.0
  pyarrow: 23.0.1
  rioxarray: 0.21.0
  gdal: 3.10.0
  ghostscript: 9.54.0
GMT library information:
  version: 6.6.0
  padding: 2
  share dir: C:/programs/gmt6/share
  plugin dir: C:/programs/gmt6/bin/gmt_plugins
  library path: C:/programs/gmt6/bin/gmt_w64.dll
  cores: 40
  grid layout: rows
  image layout: 
  binary version: 6.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions