Our of memory error during unit tests
Closed this issue · 1 comments
holzkohlengrill commented
Description
Failure
Traceback (most recent call last):
File "C:\0-repos\Emma\tests\functional_tests\test__cmd_line.py", line 212, in test_normalRun
Emma.emma_vis.main(argsEmmaVis)
File "C:\0-repos\Emma\tests\functional_tests\..\..\Emma\emma_vis.py", line 110, in main
consumptionModule.appendModuleConsumptionToMarkdownOverview(markdownFilePath)
File "C:\0-repos\Emma\tests\functional_tests\..\..\Emma\emma_vis_libs\dataVisualiserObjects.py", line 151, in appendModuleConsumptionToMarkdownOverview
self.plotByCategorisedModules(plotShow=False) # Re-write .png to ensure up-to-date overview
File "C:\0-repos\Emma\tests\functional_tests\..\..\Emma\emma_vis_libs\dataVisualiserObjects.py", line 52, in plotByCategorisedModules
Emma.shared_libs.emma_helper.saveMatplotlibPicture(figure, os.path.join(self.resultsPath, filename), MEMORY_ESTIMATION_PICTURE_FILE_EXTENSION, MEMORY_ESTIMATION_PICTURE_DPI, False)
File "C:\0-repos\Emma\tests\functional_tests\..\..\Emma\shared_libs\emma_helper.py", line 299, in saveMatplotlibPicture
pictureData.savefig(fileObject, format=savefigFormat, dpi=savefigDpi, transparent=savefigTransparent)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\matplotlib\figure.py", line 2180, in savefig
self.canvas.print_figure(fname, **kwargs)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\matplotlib\backend_bases.py", line 2082, in print_figure
**kwargs)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\matplotlib\backends\backend_agg.py", line 527, in print_png
FigureCanvasAgg.draw(self)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\matplotlib\backends\backend_agg.py", line 386, in draw
self.renderer = self.get_renderer(cleared=True)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\matplotlib\backends\backend_agg.py", line 399, in get_renderer
self.renderer = RendererAgg(w, h, self.figure.dpi)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\matplotlib\backends\backend_agg.py", line 86, in __init__
self._renderer = _RendererAgg(int(width), int(height), dpi)
MemoryError: In RendererAgg: Out of memory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python37-32\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Program Files (x86)\Python37-32\lib\unittest\case.py", line 615, in run
testMethod()
File "C:\0-repos\Emma\tests\functional_tests\test__cmd_line.py", line 215, in test_normalRun
self.fail("Unexpected exception: " + str(e))
File "C:\Program Files (x86)\Python37-32\lib\unittest\case.py", line 680, in fail
raise self.failureException(msg)
AssertionError: Unexpected exception: In RendererAgg: Out of memory
Steps to reproduce
Interestingly that does not always happen. I could not reproduce a scenario that always produces this error - even on the same machine.
Mostly this happens during a unit test run.
Python version: 3.7.0
OS: Win10
Installed packages:
pip3 list
Package Version
-------------------- ----------
-yqt5-sip 4.19.13
Arpeggio 1.9.0
astroid 2.1.0
atomicwrites 1.3.0
attrs 19.1.0
backcall 0.1.0
bleach 3.0.2
certifi 2018.10.15
chardet 3.0.4
Click 7.0
codacy-coverage 1.3.11
colorama 0.4.0
coverage 4.5.3
coveralls 1.8.1
csv2md 1.0.1
csvtomd 0.3.0
cycler 0.10.0
decorator 4.3.0
defusedxml 0.5.0
docopt 0.6.2
docutils 0.14
entrypoints 0.2.3
gprof2dot 2017.9.19
graphviz 0.11.1
idna 2.7
ipykernel 5.1.0
ipython 7.1.1
ipython-genutils 0.2.0
isort 4.3.17
jedi 0.13.1
Jinja2 2.10
jsonschema 2.6.0
jupyter-client 5.2.3
jupyter-core 4.4.0
jupyterlab 0.35.4
jupyterlab-server 0.2.0
kiwisolver 1.0.1
lazy-object-proxy 1.3.1
lxml 4.3.4
Markdown 3.1.1
Markups 3.0.0
MarkupSafe 1.1.0
matplotlib 3.1.0
mccabe 0.6.1
mistune 0.8.4
more-itertools 7.0.0
nbconvert 5.4.0
nbformat 4.4.0
nose 1.3.7
notebook 5.7.0
numpy 1.15.2
ordered-set 3.1.1
pandas 0.24.2
pandocfilters 1.4.2
parso 0.3.1
pathspec 0.5.9
pickleshare 0.7.5
pip 19.2.1
pluggy 0.9.0
ply 3.11
prometheus-client 0.4.2
prompt-toolkit 2.0.7
py 1.8.0
pydeps 1.7.1
pyecore 0.10.2
pyenchant 2.0.0
Pygments 2.3.1
pylint 2.2.2
pyparsing 2.2.2
pypiscout 2.0
pypiwin32 223
PyQt5 5.12.1
PyQt5-sip 4.19.15
PySide2 5.11.2
pytest 4.4.1
pytest-cov 2.7.1
python-dateutil 2.7.3
python-gitlab 1.6.0
python-markdown-math 0.6
pytz 2018.5
pywin32 224
pywinpty 0.5.4
PyYAML 5.1.1
pyzmq 17.1.2
requests 2.21.0
RestrictedPython 4.0
scikit-learn 0.20.1
scipy 1.1.0
seaborn 0.9.0
Send2Trash 1.5.0
setuptools 39.0.1
six 1.11.0
sklearn 0.0
stdlib-list 0.5.0
terminado 0.8.1
testpath 0.4.2
textX 1.8.0
tornado 5.1.1
traitlets 4.3.2
typed-ast 1.3.4
urllib3 1.24.1
wcwidth 0.1.7
webencodings 0.5.1
wrapt 1.11.1
yamllint 1.16.0
WARNING: You are using pip version 19.2.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
holzkohlengrill commented
See also: matplotlib/matplotlib#8519
Suggestions of this post did not seem to help.