[ase-users] failing tests

Ask Hjorth Larsen asklarsen at gmail.com
Sat Apr 8 00:03:11 CEST 2017


Hi Panu

2017-03-27 23:48 GMT+02:00 Panu Sam-Ang via ase-users
<ase-users at listserv.fysik.dtu.dk>:
> Hello,
>
> I ran   ase.test   and the following errors
>
>
> ======================================================================
>
> ERROR: bandstructure.py
>
> ----------------------------------------------------------------------
>
> Traceback (most recent call last):
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/ase/test/__init__.py", line
> 51, in testfile
>
>     exec(compile(fd.read(), self.filename, 'exec'), {})
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/ase/test/bandstructure.py",
> line 19, in <module>
>
>     bs.plot(emax=10, filename='bs.png')
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/ase/dft/band_structure.py",
> line 70, in plot
>
>     import matplotlib.pyplot as plt
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/pyplot.py", line
> 37, in <module>
>
>     from matplotlib.figure import Figure, figaspect
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/figure.py", line
> 40, in <module>
>
>     from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/axes/__init__.py",
> line 4, in <module>
>
>     from ._subplots import *
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/axes/_subplots.py",
> line 10, in <module>
>
>     from matplotlib.axes._axes import Axes
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/axes/_axes.py",
> line 24, in <module>
>
>     import matplotlib.dates as _  # <-registers a date unit converter
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/dates.py",
> line 125, in <module>
>
>     from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/dateutil/rrule.py",
> line 19, in <module>
>
>     from six.moves import _thread, range
>
> ImportError: cannot import name _thread
>
>
> ======================================================================
>
> ERROR: fio/oi.py
>
> ----------------------------------------------------------------------
>
> Traceback (most recent call last):
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/ase/test/__init__.py", line
> 51, in testfile
>
>     exec(compile(fd.read(), self.filename, 'exec'), {})
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/ase/test/fio/oi.py",
> line 90, in <module>
>
>     write(fname1, atoms, format=format)
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/ase/io/formats.py",
> line 230, in write
>
>     _write(filename, fd, format, io, images, **kwargs)
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/ase/io/formats.py",
> line 266, in _write
>
>     io.write(filename, images, **kwargs)
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/ase/io/eps.py", line
> 215, in write_eps
>
>     EPS(atoms, **parameters).write(filename)
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/ase/io/eps.py", line
> 139, in write
>
>     self.write_header()
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/ase/io/eps.py", line
> 149, in write_header
>
>     from matplotlib.backends.backend_ps import RendererPS, psDefs
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/backends/backend_ps.py",
> line 29, in <module>
>
>     from matplotlib.figure import Figure
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/figure.py", line
> 40, in <module>
>
>     from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/axes/__init__.py",
> line 4, in <module>
>
>     from ._subplots import *
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/axes/_subplots.py",
> line 10, in <module>
>
>     from matplotlib.axes._axes import Axes
>
>   File
> "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/axes/_axes.py",
> line 24, in <module>
>
>     import matplotlib.dates as _  # <-registers a date unit converter
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/matplotlib/dates.py",
> line 125, in <module>
>
>     from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
>
>   File "/Users/Panu/.local/lib/python2.7/site-packages/dateutil/rrule.py",
> line 19, in <module>
>
>     from six.moves import _thread, range
>
> ImportError: cannot import name _thread
>
>
> ----------------------------------------------------------------------
>
> Ran 185 tests in 183.531s
>
>
> FAILED (errors=2)
>
>
>
> Before this I got the import error "No module named cycler" so I installed
> the module by "sudo pip install cycler   "  and then it showed no
> functools32 so I did "udo pip install functools32"  and it gave me the above
> errors.  My guess is that the problem is caused by the default Python on Mac
> and I should use a different Python (e.g. Anaconda) ?   Does anyone have an
> idea how to solve this problem?

The failures take place in packages that are not part of core Python.

It seems that dateutil attempts to import "_thread" from six.moves
where it is not defined.

So the problem exists - apparently - between dateutil and six.  You
might be able to install different versions of the packages and make
it work that way, but if the dependencies of non-ASE packages are not
handled automatically, this could become quite a mess.

Best regards
Ask

>
>
> Thank you,
> Panu
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users


More information about the ase-users mailing list