Gmt [ERROR]: Cannot run a one-liner modern command within an existing modern mode session

Hello everyone!

I’m new on gmt and I am attending the well-done tutorial released by gmt self. Despite all, I am having some issues working on my script.

I’m trying to run these commands but if I add the option -png gulf_of_mexico the png file won’t be created, instead it will return me an error message like the one below:

I tried not to use the option -png gulf_of_mexico and it works well but it does not show the output. In the same way, if I try running the two commands separately the script works well. It seems that gmt grimage and gmt coast cannot lay together in a single png file.
I specify I’m working with a .bat file.

I hope some of you could help me. Thanks in advance :slight_smile:

Okay guys, I found out the issue. It was necessary to write ‘gmt end show’, not just “gmt end”.