Changeset 2721 for trunk/GSASIIobj.py


Ignore:
Timestamp:
Feb 23, 2017 1:26:52 PM (5 years ago)
Author:
vondreele
Message:

fix pseudo variable issues when some vals are None
fix problem of moved ge multi-image files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIobj.py

    r2708 r2721  
    20302030                    self.exprDict[v] = parmDict[varname]
    20312031            else:
    2032                 raise Exception,"No value for variable "+str(v)
     2032                self.exprDict[v] = None
     2033#                raise Exception,"No value for variable "+str(v)
    20332034        self.exprDict.update(self.fxnpkgdict)
    20342035
     
    20772078        if self.compiledExpr is None:
    20782079            raise Exception,"EvalExpression called before SetupCalc"
    2079         val = eval(self.compiledExpr,globals(),self.exprDict)
     2080        try:
     2081            val = eval(self.compiledExpr,globals(),self.exprDict)
     2082        except TypeError:
     2083            val = None
    20802084        if not np.isscalar(val):
    20812085            val = np.sum(val)
Note: See TracChangeset for help on using the changeset viewer.