Opened 4 years ago

Closed 4 years ago

#956 closed defect (fixed)

Possible problem with new doc build process

Reported by: smk78 Owned by: ajj
Priority: blocker Milestone: SasView 4.2.0
Component: SasView Keywords:
Cc: Work Package: SasView Documentation


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 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.

Attachments (1)

doc-build-err.txt (108.0 KB) - added by smk78 4 years ago.
smk78 new doc build traceback

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by smk78

smk78 new doc build traceback

comment:1 Changed 4 years ago by richardh

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?


$ python 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 ../sasmodels/models/ model/be_polyelectrolyte.rst
python ../sasmodels/models/ model/binary_hard_sphere.rst
python ../sasmodels/models/ model/broad_peak.rst
python ../sasmodels/models/ model/capped_cylinder.rst
Traceback (most recent call last):

File "", line 193, in <module>


File "", line 190, in process_model

make_figure(model_info, opts)

File "", line 124, in make_figure

plt.savefig(path, bbox_inches='tight')

File "C:\Anaconda2\lib\site-packages\matplotlib\", line 471, in savefig

return fig.savefig(*args, kwargs)

File "C:\Anaconda2\lib\site-packages\matplotlib\", line 1185, in savefig

self.canvas.print_figure(*args, kwargs)

File "C:\Anaconda2\lib\site-packages\matplotlib\", line 1983, in print_figure


File "C:\Anaconda2\lib\site-packages\matplotlib\backends\", line 469, in print_png


File "C:\Anaconda2\lib\site-packages\matplotlib\backends\", line 421, in draw


File "C:\Anaconda2\lib\site-packages\matplotlib\", line 55, in draw_wrapper

draw(artist, renderer, *args, kwargs)

File "C:\Anaconda2\lib\site-packages\matplotlib\", line 898, in draw


File "C:\Anaconda2\lib\site-packages\matplotlib\", line 55, in draw_wrapper

draw(artist, renderer, *args, kwargs)

File "C:\Anaconda2\lib\site-packages\matplotlib\", line 1997, in draw


File "C:\Anaconda2\lib\site-packages\matplotlib\", line 55, in draw_wrapper

draw(artist, renderer, *args, kwargs)

File "C:\Anaconda2\lib\site-packages\matplotlib\", line 350, in draw

im = self.make_image(renderer.get_image_magnification())

File "C:\Anaconda2\lib\site-packages\matplotlib\", line 569, in make_image


File "C:\Anaconda2\lib\site-packages\matplotlib\", line 201, in _get_unsampled_image

x = self.to_rgba(self._A, bytes=True)

File "C:\Anaconda2\lib\site-packages\matplotlib\", 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

comment:2 Changed 4 years ago by richardh

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 ( :: C:\Anaconda2\lib\site-packages\matplotlib\ 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.

comment:3 Changed 4 years ago by butler

  • Milestone changed from SasView 4.1.1 to SasView 4.2.0

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.

comment:4 Changed 4 years ago by richardh

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:

As usual I followed the notes here:

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.


comment:5 Changed 4 years ago by smk78

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:
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:
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:

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.

comment:6 Changed 4 years ago by smk78

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.