Ticket #207 (closed bug: duplicate)

Opened 6 years ago

Last modified 6 years ago

bug v owcontexts

Reported by: gregor Owned by: somebody
Milestone: 1.0 Component: canvas
Severity: minor Keywords:
Cc: Blocking:
Blocked By:

Description

radviz (in sklepam da tudi ostali widgeti) vedno ko ga odstranim javi da ni uspesno shranil settingov. ce ujamem exception dobim:

Code: OWWidget.saveSettings(self)

File: OWBaseWidget.py in line 369 Function name: saveSettings Code: contextHandler.mergeBack(self)

File: OWContexts.py in line 406 Function name: mergeBack Code: self.globalContexts = filter(lambda c: len(c.attributes) + len(c.metas) < mp, self.globalContexts)

File: OWContexts.py in line 406 Function name: Code: self.globalContexts = filter(lambda c: len(c.attributes) + len(c.metas) < mp, self.globalContexts) Exception type: Exception value: object of type 'int' has no len()

tezava je v tem, da je c.metas = 0, namesto, da bi bil nek slovar. problem je verjetno v encodeDomain, kjer imas:

metas = self.hasMetaAttributes and \

dict([(attr.name, attr.varType != orange.VarTypes.Discrete and attr.varType or attr.values) for attr in domain.getmetas().values()])

v primeru da ni meta atributov je vrednost metas = 0. podoben problem se lahko verjetno zgodi tudi par vrstic visje, kjer imas: attributes = self.hasOrdinary attributes and ....

Change History

comment:1 Changed 6 years ago by gregor

  • Owner changed from janez to somebody
  • Component changed from core to widgets

comment:2 Changed 6 years ago by janez

  • Status changed from new to closed
  • Resolution set to duplicate
Note: See TracTickets for help on using tickets.