Matplotlib.savefig: permission denied

Hi all,

I am using matplotlib with the savefig function to save a plot as a PDF file. I am getting “PermissionError: [Errno 13] Permission denied: ‘SoM_2.1.1.pdf’”. What do I need to do to be able tow create a file on my Swan project area?

Cheers,
Ralf.

Dear Ralf,

Could you please open a ticket here:

https://cern.service-now.com/service-portal?id=functional_element&name=swan

Our experts will take care of the issue asap.

Enric

Dear Eric,

Thanks for your reply. The funny thing is, that when I closed the notebook and opened it again, it did work! It seems to have something to do with the login … but I cannot reproduce it now. I can write to files in my project directory. So, I guess, we can close this topic unless it happens again …

Cheers,
Ralf.

Dear Ralf,

Good to hear it works now, please feel free to open a ticket if it happens again.

Best,

Enric

Hi Ralf,
I fixed this by opening the terminal in swan and type kinit to restart the shell so that you don’t have to restart the whole swan thing every time. This issue happens basically because of some logout problem in the swan shell.
best regards,
Zhenxuan

Hi Zhenxuan,

Thanks for your reply. I will do next time what you suggest. I guess my token had effectively expired …

Thanks for your help. Cheers,

Ralf.