- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 688
 
Closed
Milestone
Description
I regularly see this error when testing on the buildbot:
sage -t -long  -force_lib devel/sage/doc/de/tutorial/tour_functions.rst
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/devel/sage-main/doc/de/tutorial/tour_functions.rst", line 24:
    sage: plot(f, 0, 2)
Exception raised:
    Traceback (most recent call last):
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_0[5]>", line 1, in <module>
        plot(f, Integer(0), Integer(2))###line 24:
    sage: plot(f, 0, 2)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/misc/displayhook.py", line 174, in displayhook
        print_obj(sys.stdout, obj)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/misc/displayhook.py", line 142, in print_obj
        print >>out_stream, `obj`
      File "sage_object.pyx", line 154, in sage.structure.sage_object.SageObject.__repr__ (sage/structure/sage_object.c:1463)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/plot/plot.py", line 1081, in _repr_
        self.show()
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/misc/decorators.py", line 426, in wrapper
        return func(*args, **kwds)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/plot/plot.py", line 1723, in show
        self.save(DOCTEST_MODE_FILE, **kwds)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/misc/decorators.py", line 426, in wrapper
        return func(*args, **kwds)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/plot/plot.py", line 2453, in save
        figure = self.matplotlib(**options)
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/sage/plot/plot.py", line 1930, in matplotlib
        from matplotlib.figure import Figure, figaspect
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/matplotlib/figure.py", line 18, in <module>
        from axes import Axes, SubplotBase, subplot_class_factory
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/matplotlib/axes.py", line 18, in <module>
        import matplotlib.contour as mcontour
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/matplotlib/contour.py", line 21, in <module>
        import matplotlib.texmanager as texmanager
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/matplotlib/texmanager.py", line 72, in <module>
        class TexManager:
      File "/Users/buildbot/build/sage/bsd-1/bsd_64_upgrade/build/sage-4.5.3-4.7.1/local/lib/python/site-packages/matplotlib/texmanager.py", line 92, in TexManager
        os.mkdir(texcache)
    OSError: [Errno 17] File exists: '/tmp/dot_sage.WboXjWq0ow/matplotlib-1.0.1/tex.cache'
The problem looks to be the following race condition in the matplotlib code:
    if not os.path.exists(texcache):
        os.mkdir(texcache)
New spkg available at
http://sage.math.washington.edu/home/palmieri/SPKG/matplotlib-1.0.1.p0.spkg
Component: packages: standard
Keywords: MPL Errno 17 libpng
Author: John Palmieri
Reviewer: Leif Leonhardy
Merged: sage-4.7.2.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/11686