Closed smk78 closed 5 years ago
Trac update at 2017/04/18 16:50:50
:
smk78 new doc build traceback
Trac update at 2017/04/18 17:11:46
: richardh commented:
I cloned saview etc to completely new directories.
python setup/py docs first gives errors such as the one below, thpugh seems to stop at a different place each time I run it, on some previous times it complained after barbell. The docs in sasview are OK but the models section is missing.
Do we stil need to "make clean html" in sasmodels/doc, though that falls over also with same error as below?
Richard
$ python setup.py docs
('Removing existing build directory', 'C:\sasview4\sasview\build', 'for a clean build')
running docs
('========= check for sasmodels at', 'C:\sasview4\sasmodels\doc', '============')
============= Building sasmodels model documentation ===============
make: Entering directory C:/sasview4/sasmodels/doc' python genmodel.py ../sasmodels/models/be_polyelectrolyte.py model/be_polyelectrolyte.rst python genmodel.py ../sasmodels/models/binary_hard_sphere.py model/binary_hard_sphere.rst python genmodel.py ../sasmodels/models/broad_peak.py model/broad_peak.rst python genmodel.py ../sasmodels/models/capped_cylinder.py model/capped_cylinder.rst Traceback (most recent call last): File "genmodel.py", line 193, in <module> process_model(sys.argv[1]) File "genmodel.py", line 190, in process_model make_figure(model_info, opts) File "genmodel.py", line 124, in make_figure plt.savefig(path, bbox_inches='tight') File "C:\Anaconda2\lib\site-packages\matplotlib\pyplot.py", line 471, in savefig return fig.savefig(*args, **kwargs) File "C:\Anaconda2\lib\site-packages\matplotlib\figure.py", line 1185, in savefig self.canvas.print_figure(*args, **kwargs) File "C:\Anaconda2\lib\site-packages\matplotlib\backend_bases.py", line 1983, in print_figure **kwargs) File "C:\Anaconda2\lib\site-packages\matplotlib\backends\backend_agg.py", line 469, in print_png FigureCanvasAgg.draw(self) File "C:\Anaconda2\lib\site-packages\matplotlib\backends\backend_agg.py", line 421, in draw self.figure.draw(self.renderer) File "C:\Anaconda2\lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Anaconda2\lib\site-packages\matplotlib\figure.py", line 898, in draw func(*args) File "C:\Anaconda2\lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Anaconda2\lib\site-packages\matplotlib\axes.py", line 1997, in draw a.draw(renderer) File "C:\Anaconda2\lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Anaconda2\lib\site-packages\matplotlib\image.py", line 350, in draw im = self.make_image(renderer.get_image_magnification()) File "C:\Anaconda2\lib\site-packages\matplotlib\image.py", line 569, in make_image transformed_viewLim) File "C:\Anaconda2\lib\site-packages\matplotlib\image.py", line 201, in _get_unsampled_image x = self.to_rgba(self._A, bytes=True) File "C:\Anaconda2\lib\site-packages\matplotlib\cm.py", line 214, in to_rgba x = self.cmap(x, alpha=alpha, bytes=bytes) TypeError: 'NoneType' object is not callable make: *** [model/capped_cylinder.rst] Error 1 make: Leaving directory
C:/sasview4/sasmodels/doc'
running build
Trac update at 2017/05/02 11:09:01
: richardh commented:
Above seems to be a matplotlib issue with the auto-generated images in the docs.
When I build & run sasview itself, then sasview.log has message below, is this related?
2017-05-02 11:53:06,487 : WARNING : py.warnings (init.py:921) :: C:\Anaconda2\lib\site-packages\matplotlib__init__.py:921: UserWarning: This call to matplotlib.use() has no effect because the the backend has already been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first time.
Trac update at 2017/05/02 14:27:47
:
This should only apply to 4.2 and beyond since 4.1.1 is a patch release off of 4.1 release tag and not off of master. Thus moving this ticket to 4.2 as discussed at fortnightly meeting.
Trac update at 2017/05/22 09:22:13
: richardh commented:
I have fixed sasmodels docs build on my Win7 PC, having noted that my Win7 laptop had matplotlib 1.4.2 but my pc only 1.1.1 Which check_packages did not complain about, and is supposed to be OK according to here: http://trac.sasview.org/wiki/WinBuildDependencies
As usual I followed the notes here: http://trac.sasview.org/wiki/AnacondaSetup
did the "conda install ....", twice, which still kept matplotlib 1.1.1, so then pip uninstall matplotlib pip install matplotlib==1.4.2
Now my docs for sasmodels build properly. However all this reinstallation of packages may have simply unlocked some other issue.
Richard
Trac update at 2017/06/01 10:22:00
: smk78 commented:
I have now also got the docs to build on my office desktop (in addition to my Code Camp laptop), ''however'' both my machines already had matplotlib 1.4.3 installed (ie, newer than Richard's), so I think Richard's comment above may be a red herring.
What I did notice was that my office versions of reportlab, lxml, h5py, setuptools, and comtypes were all some versions behind my laptop. Having installed the same (or almost the same in the case of comtypes; my laptop is a point release ahead) versions as my laptop the docs build.
So I now have:
Checking Required Package Versions....
Common Packages reportlab Version Installed: 3.2.0 lxml Version Installed: 3.4.4.0 PIL Version Installed: 1.1.7 xhtml2pdf Version Installed: 0.2b1 pyopencl Version Installed: 2015.1 unittest-xml-reporting Version Installed: 1.10.0 pylint Installed (Unknown version) matplotlib Version Installed: 1.4.3 bumps Version Installed: 0.7.5.9 scipy Version Installed: 0.18.0 periodictable Version Installed: 1.4.1 setuptools Version Installed: 26.1.1 h5py Version Installed: 2.4.0 sphinx Version Installed: 1.3.6 pyparsing Version Installed: 2.0.3 numpy Version Installed: 1.11.1 html5lib Version Installed: 1.0b10 wx Version Installed: 3.0.0.0
Windows Specific Packages: pywin Version Installed: 219 py2exe Version Installed: 0.6.9 comtypes Version Installed: 1.1.1
Deprecated Packages You can remove these unless you need them for other reasons! pyPDF Installed (Version unknown)
Am closing this ticket.
Trac update at 2017/06/01 10:22:11
:
Having returned from Code Camp and set about updating his office build environment, Richard noticed the docs weren't building properly using the new '''python setup.py docs''' command. So I pull-ed and tried on my office desktop and found the same thing. Traceback attached. Seems to be an issue with the API rst files.
Oddly, everything is working on our Code Camp laptops.
I tried deleting my sasview and sasmodels doc build directories on my desktop and trying the doc build again but got the same thing.
Looking at the datetime stamps on some rst files I am harbouring suspicions that the new procedure is not properly slurping files around and what we see on our laptops is because it is finding 'legacy' files from earlier doc builds.
Migrated from http://trac.sasview.org/ticket/956