Hello all!
I have been using Pygmt since last year. I find no such major problems. But today, while I was saving my figures I got the following error:
GMTCLibError: Module ‘psconvert’ failed with status code 79:
psconvert [ERROR]: System call [@gswin64c -q -dNOPAUSE -dBATCH -dNOSAFER -dSCANCONVERTERTYPE=2 -dMaxBitmap=2147483647 -dUseFastColor=true -dGraphicsAlphaBits=2 -dTextAlphaBits=2 -sDEVICE=pngalpha -g2397x1195 -r300 -sOutputFile=“L:/PhD/Paper-2 SM Complex Network/ECA/figures/Correlation_E_T.png” “C:/Users/ktripat/.gmt/sessions/gmt_session.25792/psconvert_21416d.eps”] returned error 1.
In the anaconda command prompt, where I activated the pygmt environment using “conda activate pygmt”, its showing the error: “GPL Ghostscript 9.54.0: Unrecoverable error, exit code 1”.
I have given a picture of the error that I get in the jupyter notebook. Please look at it.
This error was not before today and I was able to smoothly save the figures. Can anyone tell me how to fix this bug???
Hi @seisman thank you for replying back me.
I run your code in jupyter and this is the output I get:
PyGMT information:
version: v0.7.0
System information:
python: 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 06:57:19) [MSC v.1929 64 bit (AMD64)]
executable: C:\Users\ktripat\Anaconda3\envs\pygmt2\python.exe
machine: Windows-10-10.0.19044-SP0
Dependency information:
numpy: 1.23.1
pandas: 1.4.3
xarray: 2022.3.0
netCDF4: 1.6.0
packaging: 21.3
geopandas: None
ghostscript: 9.54.0
gmt: 6.4.0
GMT library information:
binary dir: C:/Users/ktripat/Anaconda3/envs/pygmt2
cores: 8
grid layout: rows
library path: C:/Users/ktripat/Anaconda3/envs/pygmt2/Library/bin/gmt.dll
padding: 2
plugin dir: C:/Users/ktripat/Anaconda3/envs/pygmt2/Library/bin/gmt_plugins
share dir: C:/Users/ktripat/Anaconda3/envs/pygmt2/Library/share/gmt
version: 6.4.0
I believe everything works perfectly, but the ghost script has some problems. Earlier, I have had never a problem with the fig.savefig command. But yesterday it started. It might be due to some changes made in the pygmt update.
Hi @seisman thank you for your consistent support. Your code absolutely runs fine and it saves the figures perfectly.
I figured out where is exactly the problem. When I give the file to save as a simple file name with png extension, it works perfectly; however, when I give the filename as a pathname plus the filename it shows that error.
For example, the following code doesn’t show any error.