On Fri, Mar 06, 2009 at 05:42:17PM +0100, Florent Hivert wrote:
> I've been stuck an entire day on a problem which may hits you. So I'm putting
> it there if someone get against it. The problem is the following:
> 
> Some test get broken even after a "hg qpop -a". The error message was:
> ImportError: cannot import name Set

                                  Sets?

> The solution is: remove the file sage-combinat/build/sage/categories/sets.pyc
> 
> Nicolas: according to cwitty, this problem is likely to appears because the
> file sage/categories/sets.py has the same name as a top-level standard Python
> module. Can you check this and rename the corresponding offending file ?

Ouch. That is a pain.

cwitty: would you have some pointers on what the problem exactly is?
Is it that we should refrain from using the shortcut from sets import Sets?
I'd rather fix the infrastructure if at all possible ...

Cheers,
                                                Nicolas


> ============
> 
> Here is an extract of an irc discussion with cwitty on how to solve the 
> problem 
> 
> 
> <hivert> In the branch combinat it seems that even an "hg qpop -a; sage -b" is
> not restoring sage in it's proper base state.
> <hivert> Some test are broken with "sage -t"...
> <hivert> I'm with sage.3.4.rc0
> <hivert> The problem is basically that after a cycle "hg qpush -a; sage -b; hg
> qpop -a; sage -b" things are not restored. Some test get broken.
> 
> <cwitty> One known bug in that area is that if "qpush -a" creates files, then 
> t
> he compiled versions are not removed by "qpop -a; sage -b".
> <cwitty> But that wouldn't usually break tests.
> <cwitty> What tests in particular break?
> 
> <hivert> Basically all of them since the import of Sets does not work 
> anymore..
> . Hint: I trying to work on the category infrastructure.
> <hivert> One strange thing is that the interactive sage seems to be perfectly 
> f
> unctional. Only sage -t is broken.
> 
> <cwitty> What error message does the import fail with?
> 
> <hivert> Hmm. The traceback is quite long. Let me try to use pastebin...
> <hivert> Here it is : http://pastebin.com/d421d6f21
> 
> <cwitty> OK, I'm guessing your problem is that sage/categories/sets.py has the
> same name as a top-level standard Python module; I'm told this can't work 
> reliably.
> <cwitty> I think you'll have to rename that file.
> 
> <hivert> Ok ! My problem now is that by a "qpop -a" I deleted this file... The
> problem is still occuring. Is there a way to get back to a working state, 
> without rein
> stalling combinat for the omege+1 time ?
> 
> <cwitty> Try to remove sage-combinat/build/sage/categories/sets.pyc and see if
> that helps.
> <hivert> Yes it does !!! Thanks a lot !!!
> 
> 
>                               Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to