Changeset 9490:cbb32ccdf1ee in orange


Ignore:
Timestamp:
08/24/11 04:16:30 (3 years ago)
Author:
wencanluo <wencanluo@…>
Branch:
default
Convert:
5039c0394479fa66da851280bc422029d2edaf9b
Message:

Fix a bug in OWFile, now it can open the mulan file directly.

Location:
orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/data/io.py

    r9489 r9490  
    1616        return Orange.multilabel.mulan.trans_mulan_data(xml_name,arff_name,create_on_new) 
    1717    else: 
    18         return loadARFF_Weka(filename, create_on_new, kwargs) 
     18        return loadARFF_Weka(filename, create_on_new) 
    1919         
    2020def loadARFF_Weka(filename, create_on_new = Orange.data.variable.Variable.MakeStatus.Incompatible, **kwargs): 
     
    9797    t = Orange.data.Table(d,lex) 
    9898    t.name = name 
    99     t.attribute_load_status = attributeLoadStatus 
     99     
     100    if hasattr(t, "attribute_load_status"): 
     101        t.attribute_load_status = attributeLoadStatus 
    100102    return t 
    101103loadARFF = Orange.misc.deprecated_keywords( 
  • orange/OrangeWidgets/Data/OWFile.py

    r9489 r9490  
    303303            if not message: 
    304304                continue 
    305             attrs = [attr.name for attr, stat in zip(data.domain, data.attributeLoadStatus) if stat == status] \ 
    306                   + [attr.name for id, attr in metas.items() if data.metaAttributeLoadStatus.get(id, -99) == status] 
     305            attrs = [] 
     306            if hasattr(data, "attribute_load_status"): 
     307                attrs = [attr.name for attr, stat in zip(data.domain, data.attributeLoadStatus) if stat == status] \ 
     308                      + [attr.name for id, attr in metas.items() if data.metaAttributeLoadStatus.get(id, -99) == status] 
    307309            if attrs: 
    308310                jattrs = ", ".join(attrs) 
Note: See TracChangeset for help on using the changeset viewer.