Changeset 2658


Ignore:
Timestamp:
Jan 23, 2017 1:34:00 PM (5 years ago)
Author:
toby
Message:

fix problem reporting histogram with Unicode chars

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2655 r2658  
    160160            kind=wx.ITEM_NORMAL,text='&New project')
    161161        self.Bind(wx.EVT_MENU, self.OnFileClose, id=item.GetId())
    162         item = parent.Append(
    163             help='Expand all items in GSAS-II data tree',id=wx.ID_ANY,
    164             kind=wx.ITEM_NORMAL,text='Expand all')
    165         self.Bind(wx.EVT_MENU,self.ExpandAll,id=item.GetId())
    166162        item = parent.Append(wx.ID_PREFERENCES, text = "&Preferences")
    167163        self.Bind(wx.EVT_MENU, self.OnPreferences, item)
     
    783779                    UseList[histoName] = SetDefaultDData('PWDR',histoName,NShkl=NShkl,NDij=NDij)
    784780                else:
    785                     raise Exception('Unexpected histogram '+str(histoName))
     781                    raise Exception('Unexpected histogram '+histoName)
    786782        wx.EndBusyCursor()
    787783        self.EnableRefineCommand()
     
    883879                    valuesdict = {'wtFactor':1.0,'Dummy':False,'ranId':ran.randint(0,sys.maxint),}
    884880                    HistName = G2obj.MakeUniqueLabel(HistName,HKLFlist)
    885                     print 'Read structure factor table '+str(HistName)+' from file '+str(self.lastimport)
     881                    print 'Read structure factor table '+HistName+' from file '+self.lastimport
    886882                    Id = self.PatternTree.AppendItem(parent=self.root,text=HistName)
    887883                    if not Bank['RefDict'].get('FF'):
     
    896892                valuesdict = {'wtFactor':1.0,'Dummy':False,'ranId':ran.randint(0,sys.maxint),}
    897893                HistName = G2obj.MakeUniqueLabel(HistName,HKLFlist)
    898                 print 'Read structure factor table '+str(HistName)+' from file '+str(self.lastimport)
     894                print 'Read structure factor table '+HistName+' from file '+self.lastimport
    899895                if not rd.RefDict.get('FF'):
    900896                    rd.RefDict['FF'] = {}
     
    18241820        self.PatternTree.Expand(Id)
    18251821        self.PatternTree.SelectItem(Id)
    1826         print('Added simulation powder data '+str(HistName)+
     1822        print('Added simulation powder data '+HistName+
    18271823              ' with parameters from '+str(rd.instmsg))
    18281824
     
    19181914            # make new histogram names unique
    19191915            HistName = G2obj.MakeUniqueLabel(HistName,SASDlist)
    1920             print 'Read small angle data '+str(HistName)+ \
    1921                 ' from file '+str(self.lastimport)
     1916            print 'Read small angle data '+HistName+ \
     1917                ' from file '+self.lastimport
    19221918            # data are read, now store them in the tree
    19231919            Id = self.PatternTree.AppendItem(parent=self.root,text=HistName)
     
    37863782                            Histograms[hist]['hId'] = hId
    37873783                        else: # would happen if a referenced histogram were renamed or deleted
    3788                             print('For phase "'+str(phase)+
    3789                                   '" unresolved reference to histogram "'+str(hist)+'"')
     3784                            print('For phase "'+phase+
     3785                                  '" unresolved reference to histogram "'+hist+'"')
    37903786        #G2obj.IndexAllIds(Histograms=Histograms,Phases=Phases)
    37913787        G2obj.IndexAllIds(Histograms=Histograms,Phases=phaseData)
  • trunk/GSASIIstrIO.py

    r2633 r2658  
    434434                    except KeyError: # would happen if a referenced histogram were
    435435                        # renamed or deleted
    436                         print('For phase "'+str(phase)+
    437                               '" unresolved reference to histogram "'+str(hist)+'"')
     436                        print('For phase "'+phase+
     437                              '" unresolved reference to histogram "'+hist+'"')
    438438    G2obj.IndexAllIds(Histograms=Histograms,Phases=Phases)
    439439    return Histograms,Phases
Note: See TracChangeset for help on using the changeset viewer.