Hey Matthieu,
Sounds like a circular import. You'll have to import FreeMonoid in the
function that you are using it in. For example:
def foo(x):
from sage.some.module import Bar
Bar(x)
...
Best,
Travis
On Friday, June 21, 2013 3:54:51 PM UTC+2, Matthieu Deneufchâtel wrote:
>
> I added the line
> from sage.monoids.free_monoid import FreeMonoid
> to the file combinat/words/finite_word.py
> and after I rebuilt the library, I get an error when I start Sage:
> /home/matthieu/Documents/sage-5.6/local/lib/python2.7/site-packages/sage/combinat/words/finite_word.py
>
> in <module>()
> 199 from sage.rings.all import Integer, Infinity, ZZ
> 200 from sage.sets.set import Set
> --> 201 from sage.monoids.free_monoid import FreeMonoid
> 202
> 203 def tomonoid_element(self):
>
> ImportError: cannot import name FreeMonoid
> Error importing ipy_profile_sage - perhaps you should run %upgrade?
> WARNING: Loading of ipy_profile_sage failed.
> Where does it come from?
> I also tried from sage.monoids.all import * but it did not work either.
> Matthieu
>
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.