GMT 6.0.0 problem in modern mode

Hello Everyone,

My name is Harold, and I joined GMT today. I am a senior undergraduate student from Tanzania, Ardhi University. I am new to GMT and I ask for your support and cooperation.

I’m currently having a problem with the GMT 6.0.0 in modern mode. I’m trying a very simple code but it wont work.
gmt begin tmp png
gmt basemap -R25/45/-15/5 -JM6i -Ba5g5
gmt coast -R25/45/-15/5 -JM6i -L28/-14+c-14+w500k+u+f -BWSne+t"Map" -Dh -N1/0.5p -W1p -Gyellow -Scornflowerblue
gmt end

If I execute the code, the CLI produces an error message:

c:\Users\Dr Ulotu\Desktop\gmt\grd>final.bat

c:\Users\Dr Ulotu\Desktop\gmt\grd>gmt begin tmp png

c:\Users\Dr Ulotu\Desktop\gmt\grd>gmt basemap -R25/45/-15/5 -JM6i -Ba5g5

c:\Users\Dr Ulotu\Desktop\gmt\grd>gmt coast -R25/45/-15/5 -JM6i -L28/-14+c-14+w5
00k+u+f -BWSne+t"Map" -Dh -N1/0.5p -W1p -Gyellow -Scornflowerblue

c:\Users\Dr Ulotu\Desktop\gmt\grd>gmt end
psconvert [ERROR]: Error for input file: No such file ('C:/Users/Dr)
psconvert [ERROR]: Syntax error: No listed input files allowed under modern GMT
end [ERROR]: Failed to call psconvert
end [ERROR]: process_figures returned error 71

I’m using Windows 7 Professional 64-bits.
The gmt-6.0.0-win64.exe was downloaded from:

Thank you in advance for your kind help,
Best regards,
Harold Ulotu.

Hi Harold,

Well come to GMT.

  • Cryptic answer to your question. You should not have told your computer that you are a Dr
  • Understandable answer. Spaces in names are a very very bad habit that leads only to troubles. Your home dir has a space c:\Users\Dr Ulotu\... and that made it fall into an GMT issue where those cases were not detected. This has been fixed in developing version but while that does not came out officialy, your only choice it to work from directories that have no spaces in their names (which you should do ALL the times).

Last thing, please use the Q&A topic to ask question. Here is only for presenting ourselves.

Hi Harold, welcome! I’ve moved your post to the Q&A section. The space in filename issue was reported at GMT can't generate plots if username has whitespaces · Issue #2646 · GenericMappingTools/gmt · GitHub, and you might need to wait for GMT 6.1.0 to come out to get the fix, or change your home directory name as @Joaquim mentioned. In the meantime, you could try GMT at GitHub - GenericMappingTools/try-gmt: Try GMT, PyGMT, and GMT.jl online! All in one place! :smile:

1 Like

I have the same exact error (“psconvert [ERROR]: Syntax error: No listed input files allowed under modern GMT mode”) but nothing to do with spaces in the filename.
There is something something else that is wrong here.

If we only had that magic ability to see scripts not posted we might even be able to help.

1 Like

Hi Paul,
Yes, indeed! Sorry for that. I’m struggling with stupid stuff about converting ps to jpg, which normally is a no brainer.
The script is attached (changed the “.bash” extension into “.txt” to allow upload). Not sure it’s going to be that useful.
If I tell “figure” to generate ps and jpg, the jpg sometimes does not generate. Then if I try to use ps2epsi followed by convert, the conversion to jpg fails. And then if I try psconvert that’s when I get the “psconvert [ERROR]: Syntax error: No listed input files allowed under modern GMT mode
I’m a bit lost I have to say.
tempo.txt (3.1 KB)

I just realise the issue might be with the “gmt psxy -JM -R100/170/-50/0 < /dev/null” command.
This is a remnant of how I was closing a file in previous GMT versions (with just the “-O” in addition at the end).
I did not realise this was useless now, and maybe causing some unexpected effects.
Will see…

Well, basically you have classic GMT calls inside a modern mode script so that can’t work out well I think. gmt end [show] takes care of psconvert so nobody is (or even can) use psconvert in a modern mode script since the PS file is hidden anyway. Any any attempt to grow a PS output file is doomed since that is gmt classic. I see a makecpt command but those dont write to stdout in modern mode unless you add -H, etc etc.
If you wanted this moder mode script to make a JPG plot you would have to tell it, e.g.

gmt figure ${reper}/PS/${nom} jpg

but of course that PS subdirectories makes no sense, etc etc.

And hopefully you are not using GMT 6.0.0…

Yes, I guess I’m becoming a bit lost with the too many recent changes.
Will need some re-selftraining…