Today I ran into an interesting runtime error using matplotlib.pyplot. This is going to get a bit technical. So if that is not your cup of tea just scroll down to the cute cat pic that deserves upvotes :D
So matplotlib.pyplot is commonly used in python to generate any type of plot: bar-charts, histograms, scatter-plots etc. For some applications you might only want to save the figure somewhere in a directory using .savefig() (and not actually show it using .show()). The weird thing is that if you end your figure generation with .savefig() the figure is still there even if the program you create saves a new figure. Generally, this won't be a big problem if you have a couple of figures but you might run into memory problems if you have hundreds of them. So it is good practice to close figures and you can do this with .close(). Here is the background info on .close. If you want to .show() and then .close() does that work? Well, .show() blocks .close() for some reason. So you need to unblock it using plt.show(block=False) and then you can .close() it. Here is a stack-exchange answer with a bit more background.
And now it is time for my cute cat!

I will have forgotten about this post when it happens to me :(
:(
I have picked your post for my daily hive voting initiative, Keep it up and Hive On!!
Thank you kind sir. I will get back on track with daily posting.
Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!
Please consider supporting our funding proposal, approving our witness (@stem.witness) or delegating to the @steemstem account (for some ROI).
Please consider using the STEMsocial app app and including @stemsocial as a beneficiary to get a stronger support.
Upvoted for the cat. I don't understand Python.
:)