Opened 21 months ago

Closed 9 months ago

#999 closed enhancement (wontfix)

PIL outputs a lot of white noise to log file

Reported by: butler Owned by: butler
Priority: minor Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Framework Enhancements

Description

In testing branch 4.1.1_issues which contained the point release tags 4.1.1 and 4.1.2 I noticed that somewhere along the line some DEBUG option somewhere seems to have been turned on so that PIL now spews out a large amount of information to the log file every time a report is saved to PDF. There are no errors that I can tell. Not sure when this got introduced but it would be good to silence this white noise. NOTE: it also existed in the master branch so was not introduced in the 4.1.1_issues branch (nobody had happened to notice that particular new "feature" in master yet).

If we know how it was introduced in the first place (it did not use to do this) we could fix it at the source. Alternatively, it may have been introduced by the new logging system introduced at the Grenoble code camp. In this case it may just be necessary to edit the settings in sasview\logging.ini as Paul Kienzle suggests. He suggest that setting [logger_root] to level=WARNING might be sufficient.

An example of the verbose output is given below

2017-09-19 20:47:42,809 : DEBUG : xhtml2pdf (document.pyc:81) :: pisaDocument options:
  src = u'<html>\n<head>\n<meta http-equiv=Content-Type content=\'text/html; charset=windows-1252\'> \n<meta name=Generator >\n</head>\n<body lang=EN-US>\n<div class=WordSection1>\n<p class=MsoNormal><b><span ><center><font size=\'4\' >           latex particles 0.5micron diameter in D2O Qdev [ Sep 19 2017 20;38;41 ]</font></center></span></center></b></p><p class=MsoNormal>&nbsp;</p>\n<p class=MsoNormal><center><font size=\'4\' > File name:            latex_smeared.xml \n</font></center></p>\n<p class=MsoNormal><center><font size=\'4\' > Model name: sphere \n</font></center></p>\n<p class=MsoNormal><center><font size=\'4\' > Q Range:     min =  0.003797, max =  0.401 \n</font></center></p>\n<p class=MsoNormal><center><font size=\'4\' > Chi2/Npts =  46.049 \n</font></center></p>\n<p class=MsoNormal>&nbsp;</p>\n<p class=MsoNormal><center><font size=\'4\' >  scale  =  0.0069012 +- 9.9301e-06  \n</font></center></p>\n<p class=MsoNormal><center><font size=\'4\' >  background  =  0.060165 +- 4.1352e-05   1/cm \n</font></center></p>\n<p class=MsoNormal><center><font size=\'4\' >  sld  =  1  1e-6/Ang^2 \n</font></center></p>\n<p class=MsoNormal><center><font size=\'4\' >  sld_solvent  =  6  1e-6/Ang^2 \n</font></center></p>\n<p class=MsoNormal><center><font size=\'4\' >  radius  =  1971.7 +- 1.6587   Ang \n</font></center></p>\n\n<p class=MsoNormal>&nbsp;</p>\n\n<p class=MsoNormal>&nbsp;</p>\n<br>\n<p class=MsoNormal><b><span ><center> <font size=\'4\' > Graph\n</font></span></center></b></p>\n<p class=MsoNormal>&nbsp;</p>\n<center>\n<br><font size=\'4\' >Model Computation</font>\n<br><font size=\'4\' >Data: "           latex particles 0.5micron diameter in D2O Qdev [ Sep 19 2017 20;38;41 ]"</font><br>\n\n\n<img src="C:\\Users\\paperspace\\Documents\\SasViewOutputTests\\test_img0.png" >\n</img>\n<p class=MsoNormal>&nbsp;</p>\n<img src="C:\\Users\\paperspace\\Documents\\SasViewOutputTests\\test_img1.png" >\n</img>\n<p class=MsoNormal>&nbsp;</p>\n</center>\n</div>\n</body>\n</html>\n'
  dest = <open file u'C:\\Users\\paperspace\\Documents\\SasViewOutputTests\\test.pdf', mode 'w+b' at 0x2101BD88>
  path = None
  link_callback = None
  xhtml = False
2017-09-19 20:47:42,884 : DEBUG : xhtml2pdf (util.pyc:517) :: FileObject 'C:\\Users\\paperspace\\Documents\\SasViewOutputTests\\test_img0.png', Basepath: 'C:\\Users\\paperspace\\Documents\\SasViewOutputTests\\__dummy__'
2017-09-19 20:47:42,884 : DEBUG : xhtml2pdf (util.pyc:532) :: URLParts: ParseResult(scheme='c', netloc='', path='\\Users\\paperspace\\Documents\\SasViewOutputTests\\test_img0.png', params='', query='', fragment='')
2017-09-19 20:47:43,119 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IHDR 16 13
2017-09-19 20:47:43,119 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM sBIT 41 4
2017-09-19 20:47:43,119 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:511) :: sBIT 41 4 (unknown)
2017-09-19 20:47:43,119 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM pHYs 57 9
2017-09-19 20:47:43,119 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IDAT 78 8192
2017-09-19 20:47:43,122 : DEBUG : xhtml2pdf (util.pyc:517) :: FileObject 'C:\\Users\\paperspace\\Documents\\SasViewOutputTests\\test_img1.png', Basepath: 'C:\\Users\\paperspace\\Documents\\SasViewOutputTests\\__dummy__'
2017-09-19 20:47:43,122 : DEBUG : xhtml2pdf (util.pyc:532) :: URLParts: ParseResult(scheme='c', netloc='', path='\\Users\\paperspace\\Documents\\SasViewOutputTests\\test_img1.png', params='', query='', fragment='')
2017-09-19 20:47:43,124 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IHDR 16 13
2017-09-19 20:47:43,124 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM sBIT 41 4
2017-09-19 20:47:43,124 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:511) :: sBIT 41 4 (unknown)
2017-09-19 20:47:43,124 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM pHYs 57 9
2017-09-19 20:47:43,124 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IDAT 78 8192
2017-09-19 20:47:43,134 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IHDR 16 13
2017-09-19 20:47:43,134 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM sBIT 41 4
2017-09-19 20:47:43,134 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:511) :: sBIT 41 4 (unknown)
2017-09-19 20:47:43,135 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM pHYs 57 9
2017-09-19 20:47:43,135 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IDAT 78 8192
2017-09-19 20:47:43,181 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IHDR 16 13
2017-09-19 20:47:43,183 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM sBIT 41 4
2017-09-19 20:47:43,183 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:511) :: sBIT 41 4 (unknown)
2017-09-19 20:47:43,183 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM pHYs 57 9
2017-09-19 20:47:43,183 : DEBUG : PIL.PngImagePlugin (PngImagePlugin.pyc:135) :: STREAM IDAT 78 8192

Change History (3)

comment:1 Changed 20 months ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 4.3.0

comment:2 Changed 9 months ago by tim

  • Owner set to butler
  • Status changed from new to assigned

I've checked this with the ESS_GUI branch on a Mac and I'm not getting this verbose output. Has it been changed in the meantime?

comment:3 Changed 9 months ago by butler

  • Resolution set to wontfix
  • Status changed from assigned to closed

This is relevant to 4.x and the wx GUI. However it is probably not worth worrying about given the minimal impact and limited resources, particularly since the logger for ESS GUI does not seem to be doing this anyway. Will close as "won't fix"

Note: See TracTickets for help on using tickets.