# How to fix this error?

**URL:** <https://forum.generic-mapping-tools.org/t/how-to-fix-this-error/4861>\
**Category:** Q&A\
**Created:** [May 2, 2024, 11:15am UTC](https://forum.generic-mapping-tools.org/t/how-to-fix-this-error/4861 "2024-05-02T11:15:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![divyanamei](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@divyanamei](https://forum.generic-mapping-tools.org/u/divyanamei)\
**Post date:** [May 2, 2024, 11:15am UTC](https://forum.generic-mapping-tools.org/t/how-to-fix-this-error/4861/1 "2024-05-02T11:15:11Z")

</div>

![image](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/6/6f7191ba14d3a6c896864ca52efcb83deeebf2a3.png)

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [May 2, 2024, 1:00pm UTC](https://forum.generic-mapping-tools.org/t/how-to-fix-this-error/4861/2 "2024-05-02T13:00:49Z")

</div>

Hi, welcome to the forum

The answer to your question is written in the 3rd line of your screen capture. And, please, avoid screen-captures of text. Just copy past the text here wrapped under triple back ticks.

---

<div class="post-metadata">

**Author:** ![andrebelem](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/andrebelem/32/1218_2.png) [@andrebelem](https://forum.generic-mapping-tools.org/u/andrebelem)\
**Post date:** [May 3, 2024, 12:08pm UTC](https://forum.generic-mapping-tools.org/t/how-to-fix-this-error/4861/3 "2024-05-03T12:08:47Z")

</div>

Hi @divyanamei,  
Creating grids with PyGMT is an art! Basically, you have to think a bit about the distribution of your input data and the resolution you want. As @Joaquim mentioned (back in 2020 ! and beyond…), this message means “that the limits of your grid are not divisible into an integer number of grid increments (plus a small tolerance).” You MUST use grdedit -A, but before that, think a bit about the grid limits and the desired increment.

If you search in the forum, there are a few discussions about this. I think it can help you to fit a solution for your problem.
