Thanks Miro, that seems to fix it. Aslak: Make a note of this for changes to ffc etc, we need to import and use xrange everywhere.
Martin On 9 July 2014 10:02, Miroslav Kuchta <[email protected]> wrote: > I have six version 1.5.2 and the snippet runs fine. Maybe in the older > versions the > import was supposed to be > > from six.moves import zip, xrange > > > > On 07/09/2014 09:50 AM, Martin Sandve Alnæs wrote: > > This import works locally on my and Aslaks machine, with both python 2.7 > and python 3.2, but the buildbots fail: > > > Traceback (most recent call last): > File "test.py", line 64, in <module> > sys.exit(main(sys.argv[1:])) > File "test.py", line 51, in main > check_which_ufl() > File "test.py", line 44, in check_which_ufl > import ufl > File > "/home/buildbot/fenicsbbot/next/lib/python2.7/site-packages/ufl/__init__.py", > line 184, in <module> > from ufl.common import product > File > "/home/buildbot/fenicsbbot/next/lib/python2.7/site-packages/ufl/common.py", > line 23, in <module> > from six.moves import zip, range > ImportError: cannot import name range > > > Is it a version problem with the 'six' module? > Does anyone other than the buildbots get an error from running: > > python -c 'import six; print(six.__version__); from six.moves import > range; print("ok")' > python3 -c 'import six; print(six.__version__); from six.moves import > range; print("ok")' > > You need the six module (python-six in apt) installed, which is now a > dependency of ufl and soon ffc. > > Martin > > > _______________________________________________ > fenics mailing > [email protected]http://fenicsproject.org/mailman/listinfo/fenics > > > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics > >
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
