VuisterLab / cing

Automated Validation of NMR Structures
http://nmr.le.ac.uk
2 stars 4 forks source link

matplotlib: savefig.figsize is not a valid rc parameter #350

Closed touwwouter closed 9 years ago

touwwouter commented 9 years ago

In matplotlib 1.4.2 the rc parameter savefig.figsize is invalid. This currently leads to problems when calling project.validate -> createHtmlCing

...
    p.validate()
  File "/home/wtouw/projects/cing/python/cing/core/classes.py", line 1193, in validate
    validateFastest = validateFastest, validateCingOnly = validateCingOnly, validateImageLess = validateImageLess)
  File "/home/wtouw/projects/cing/python/cing/core/validate.py", line 196, in validate
    project.generateHtml(htmlOnly = htmlOnly)
  File "/home/wtouw/projects/cing/python/cing/core/classes.py", line 1211, in generateHtml
    return generateHtml(self, htmlOnly = htmlOnly)
  File "/home/wtouw/projects/cing/python/cing/Libs/html.py", line 640, in generateHtml
    project.molecule.html.generateHtml(htmlOnly=htmlOnly)
  File "/home/wtouw/projects/cing/python/cing/Libs/html.py", line 2497, in generateHtml
    self._generateCingHtml(htmlOnly=htmlOnly)
  File "/home/wtouw/projects/cing/python/cing/Libs/html.py", line 2242, in _generateCingHtml
    if createHtmlCing(project, ranges = ALL_RANGES_STR ):
  File "/home/wtouw/projects/cing/python/cing/Libs/html.py", line 129, in createHtmlCing
    moleculePlotSet.renderMoleculePlotSet( printLink, createPngCopyToo=True  )
  File "/home/wtouw/projects/cing/python/cing/PluginCode/matplib.py", line 2057, in renderMoleculePlotSet
    if f():
  File "/home/wtouw/projects/cing/python/cing/PluginCode/matplib.py", line 2178, in _renderMoleculePlotSetOriginal
    if ps.hardcopy(self.fileNameList[r - 1]):
  File "/home/wtouw/projects/cing/python/cing/PluginCode/matplib.py", line 1018, in hardcopy
    rcParams.update(params)
  File "/usr/lib/python2.7/dist-packages/matplotlib/__init__.py", line 892, in update
    self[k] = v
  File "/usr/lib/python2.7/dist-packages/matplotlib/__init__.py", line 871, in __setitem__
    See rcParams.keys() for a list of valid parameters.' % (key,))
KeyError: u'savefig.figsize is not a valid rc parameter.See rcParams.keys() for a list of valid parameters.'
tjragan commented 9 years ago

Fixed in commit 2de06a8