Ticket #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: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| 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
Change History
Changed 5 years ago by yi
-
attachment
3312_clearmappers.patch
added
comment:1 Changed 5 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 5 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 5 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 5 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 5 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 5 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.
Note: See
TracTickets for help on using
tickets.

add clear_mapper call to db_config.py