← Back to team overview

ufl team mailing list archive

Re: ImportError: cannot import name exproperators

 

You are right. This seems to be a circular dependency, but in FFC
rather than UFL. I haven't been able to track it down yet but it looks
to be somewhere in the JIT compiler.

-- 
Anders


On Mon, Feb 23, 2009 at 06:37:39PM +0100, Martin Sandve Alnæs wrote:
> Maybe it has something to do with "semi-circular" dependencies a
> couple of places, where "from ufl.something import something" is
> executed runtime.
> 
> Try this line to discover the places this is done:
> for f in *.py; do echo === $f; egrep \\\ from\\\ \.\*\\\ import $f; done
> 
> I changed the "from ufl import exproperators as __exproperators"
> to "import ufl.exproperators as __exproperators" in __init__.py,
> see if that helps. Just a random thought, don't know why :-/
> 
> Martin
> 
> 
> 
> On Mon, Feb 23, 2009 at 6:17 PM, Martin Sandve Alnæs <martinal@xxxxxxxxx> wrote:
> > No problem here:
> > ...
> >  File "/usr/lib/python2.5/site-packages/ufl/algorithms/renumbering.py",
> > line 4, in <module>
> >    from ufl.common import Countedx
> > ImportError: cannot import name Countedx
> >
> > Martin
> > - Show quoted text -
> >
> >
> > On Mon, Feb 23, 2009 at 5:44 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> >> On Mon, Feb 23, 2009 at 09:55:27AM +0100, Martin Sandve Alnæs wrote:
> >>> Do you have an example? I've never encountered that issue.
> >>
> >> Try for example changing the first line in renumbering.py to
> >>
> >> from ufl.common import Countedx
> >>                              ~
> >>
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.4.9 (GNU/Linux)
> >>
> >> iEYEARECAAYFAkmi0l4ACgkQTuwUCDsYZdEkegCfdwlFByxqYGziRfYoebc+b6Eh
> >> 3c4AnRCkveZ66QhubSMzuoos3j0sQ4xJ
> >> =QeWB
> >> -----END PGP SIGNATURE-----
> >>
> >>
> >

Attachment: signature.asc
Description: Digital signature


References