Exit status 137

Hello! :grinning:
When I run my program it brokes and returns this:

Matplotlib created a temporary config/cache directory at /tmp/matplotlib-dlsn4s0n because the default path (/config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
exit status 137

Why is it?

Here’s my code

The process was killed, either by you (using Ctrl-C, Ctrl-Z, etc) or it was killed by your OS because it ran out of memory. If it was killed by your OS, you might consider following the suggestion to set MPLCONFIGDIR to a writable directory.

Thanks, Ariel.

I didn’t use any of these commands.

How can I set MPLCONFIGDIR to a writable directory? Sorry for my incompetence.

Exit 137 is a common issue in the challenge. As far as I understand, it means the program ran out of memory it can use.
Make sure you don’t have similar programs running (like Jupyter) and scale down the size of your figures.

Sorry, I’m not able to run all my program in boilerplate.
I’ve run it in my vsc and it works properly.

I’ve tried to scale down size of my figures like this:

fig, ax = plt.subplots(figsize= ())

In figsize I’ve tried different values and neither of them works. Always same broken message.

Hi. Did you find anything more?.

I am getting the same error message. I found that in my local machine the tests take around 47 seconds. Getting into it, I saw that most of the tests are very fast, but the ones with plt.subplots are very slow. I supposs that causes repli to cancel. On the other hand, I see many reports of mathplotlib being slow to run. Anyone knows if, given that the local program passed all tests, could I send the link as finished to freecodecamp?. Maybe in repli programs are not allowed to run more than some specific time… thank you all.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.