Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3312 closed defect (fixed)

[with patch, positive review] dsage.setup() -- very serious bug

Reported by: was Owned by: yi
Priority: blocker Milestone: sage-3.0.3
Component: dsage Keywords: editor_gfurnish
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Do

sage: dsage.setup()

and take all the defaults, then do it again immediately but enter a non-default hostname. BOOM! See http://sage.pastebin.com/m1ff54979 for a log of this.

The error involves sqlalchemy table insertion; somebody messed up:

    739         if not self.non_primary and '_class_state' in self.class_.__dict__ and (self.entity_name in self.class_._class_state.mappers):
--> 740              raise exceptions.ArgumentError("Class '%s' already has a primary mapper defined with entity name '%s'.  Use non_primary=True to create a non primary Mapper.  clear_mappers() will remove *all* current mappers from all classes." % (self.class_, self.entity_name))
    741 
    742         def extra_init(class_, oldinit, instance, args, kwargs):

ArgumentError: Class '<class 'sage.dsage.database.job.Job'>' already has a primary mapper defined with entity name 'None'.  Use non_primary=True to create a non primary Mapper.  clear_mappers() will remove *all* current mappers from all classes.
sage: 

Attachments (1)

3312_clearmappers.patch (1.3 KB) - added by yi 9 years ago.
add clear_mapper call to db_config.py

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by yi

add clear_mapper call to db_config.py

comment:1 Changed 9 years ago by yi

  • Summary changed from dsage.setup() -- very serious bug to [with patch, needs review] dsage.setup() -- very serious bug

comment:2 Changed 9 years ago by craigcitro

  • Keywords editor_gfurnish added
  • Summary changed from [with patch, needs review] dsage.setup() -- very serious bug to [with patch, under review by gfurnish before 6/20] dsage.setup() -- very serious bug

comment:3 Changed 9 years ago by gfurnish

  • Summary changed from [with patch, under review by gfurnish before 6/20] dsage.setup() -- very serious bug to [with patch, positive review] dsage.setup() -- very serious bug

comment:4 Changed 9 years ago by gfurnish

  • Summary changed from [with patch, positive review] dsage.setup() -- very serious bug to [with patch, under review] dsage.setup() -- very serious bug

comment:5 Changed 9 years ago by gfurnish

  • Summary changed from [with patch, under review] dsage.setup() -- very serious bug to [with patch, negative review] dsage.setup() -- very serious bug

DSage is completely broken in 3.0.2 and 3.0.3!!!!! Can you post some patches so that we can run it out of the box?

comment:6 Changed 9 years ago by yi

What exactly is wrong with this patch? Use this ticket to provide feedback about this particular patch and the issue it aims to fix. File a separate bug if dsage doesn't run for you and include some actual repro steps.

comment:7 Changed 9 years ago by gfurnish

  • Summary changed from [with patch, negative review] dsage.setup() -- very serious bug to [with patch, positive review] dsage.setup() -- very serious bug

comment:8 Changed 9 years ago by was

  • Resolution set to fixed
  • Status changed from new to closed

comment:9 Changed 9 years ago by mabshoff

  • Milestone changed from sage-3.0.4 to sage-3.0.3

Merged in Sage 3.0.3.final

Note: See TracTickets for help on using tickets.