next up previous Python Library Reference contents modules index

Wpre - Common problems and solutions

The Wpre system is a very stable system that has many error recovery features built in. This section describes the various error messages that may occur and possible solutions.

Undefined variable

If you do not define all of the variables that are in the embedded string or file, the Wpre system replaces the missing variable with a message that indicates which variable was not defined in the script (which variable was not or did not appear in the variable dictionary passed to Wpre ). As an example, this is the error you would receive in place of the variable if you forgot to define the date_and_time variable:

expression evaluation failed  Expr:date_and_time
This error may also occur if the spelling of the embedded variable does not match that of the defined variable. Using the above example, if the date_and_time variable was embedded in the  text as date_and_times, the system would print out the same error introduced above.

To resolve this issue, make sure that the expected variable is defined before the process() or evaluate() function is called, and that the spelling of the variable name is consistant.
 

Variable did not appear as expected

The value of the variable you defined did not appear in the output. Most likely the raw string or file supplied to Wpre did not contain the variable to be replaced, or you did not use the correct syntax for defining the embedded variables. All variables embedded inside strings or files need to be flagged with the ` character.
 

Erroneous expression results

If you experience erroneous results when using embedded Python expressions, make sure that the expression is syntactically correct. In most cases unbalanced parentheses are the cause of erroneous results.
 

Other errors

If you happen to find other errors or run into problems that are not documented, please email me at pshafae@leibniz.jhpc.cs.depaul.edu so that a solution can be posted.


next up previous Python Library Reference contents modules index

Send comments on this document to pshafae@leibniz.jhpc.cs.depaul.edu

Copyright(C) Java and High-Performance Computing Laboratory (JHPC) at DePaul University Chicago
Documentation template borrowed from python.org