0 votes
70 views

Hello everybody,

I have received an xls file from a consultant working with Simapro Flow. I tried to import it and it did work but for 3 parsing errors.

Is there anything I can do to avoid these errors, or else correct them in the original file, so that I can import them correctly? One of the error messages (they all refer basically all the same problem) is the following:

09:41:39ERRORorg.openlca.core.matrix.CalcExchangeFormula evaluation failed, exchange 5778097
org.openlca.expressions.InterpreterException: Evaluation of expression iff(sensitivity=1 OR sensitivity=2;0;share_spruce/density_spruce) failed: Encountered " <IDENTIFIER> "or "" at line 1, column 19. Was expecting one of: <AND> ... <OR> ... "+" ... "-" ... "*" ... "/" ... "div" ... "<" ... "<=" ... <EQ> ... <NEQ> ... ">" ... ">=" ... "^" ... "mod" ... "xor" ... ")" ... ";" ...
    at org.openlca.expressions.Scope.eval(Scope.java:71)
    at org.openlca.core.matrix.CalcExchange.matrixValue(CalcExchange.java:96)
    at org.openlca.core.matrix.InventoryBuilder.add(InventoryBuilder.java:207)
    at org.openlca.core.matrix.InventoryBuilder.addIntervention(InventoryBuilder.java:190)
    at org.openlca.core.matrix.InventoryBuilder.putExchangeValue(InventoryBuilder.java:170)
    at org.openlca.core.matrix.InventoryBuilder.lambda$fillMatrices$0(InventoryBuilder.java:108)
    at org.openlca.core.matrix.cache.ExchangeTable.lambda$each$0(ExchangeTable.java:48)
    at org.openlca.core.database.NativeSql.query(NativeSql.java:58)
    at org.openlca.core.matrix.cache.ExchangeTable.each(ExchangeTable.java:44)
    at org.openlca.core.matrix.InventoryBuilder.fillMatrices(InventoryBuilder.java:105)
    at org.openlca.core.matrix.InventoryBuilder.build(InventoryBuilder.java:74)
    at org.openlca.core.matrix.MatrixConfig$Builder.build(MatrixConfig.java:165)
    at org.openlca.core.math.SystemCalculator.solve(SystemCalculator.java:84)
    at org.openlca.core.math.SystemCalculator.calculateLazy(SystemCalculator.java:69)
    at org.openlca.app.wizards.calculation.CalculationWizard.runCalculation(CalculationWizard.java:141)
    at org.openlca.app.wizards.calculation.CalculationWizard.lambda$1(CalculationWizard.java:109)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)
Caused by: org.openlca.expressions.ParseException: Encountered " <IDENTIFIER> "or "" at line 1, column 19. Was expecting one of: <AND> ... <OR> ... "+" ... "-" ... "*" ... "/" ... "div" ... "<" ... "<=" ... <EQ> ... <NEQ> ... ">" ... ">=" ... "^" ... "mod" ... "xor" ... ")" ... ";" ...
    at org.openlca.expressions.FormulaParser.generateParseException(FormulaParser.java:665)
    at org.openlca.expressions.FormulaParser.jj_consume_token(FormulaParser.java:550)
    at org.openlca.expressions.FormulaParser.function(FormulaParser.java:395)
    at org.openlca.expressions.FormulaParser.element(FormulaParser.java:337)
    at org.openlca.expressions.FormulaParser.unary(FormulaParser.java:307)
    at org.openlca.expressions.FormulaParser.power(FormulaParser.java:259)
    at org.openlca.expressions.FormulaParser.term(FormulaParser.java:211)
    at org.openlca.expressions.FormulaParser.realsum(FormulaParser.java:175)
    at org.openlca.expressions.FormulaParser.compare(FormulaParser.java:112)
    at org.openlca.expressions.FormulaParser.logicalAnd(FormulaParser.java:92)
    at org.openlca.expressions.FormulaParser.logicalXor(FormulaParser.java:72)
    at org.openlca.expressions.FormulaParser.logicalOr(FormulaParser.java:52)
    at org.openlca.expressions.FormulaParser.expand(FormulaParser.java:46)
    at org.openlca.expressions.FormulaParser.parse(FormulaParser.java:41)
    at org.openlca.expressions.Scope.tryEval(Scope.java:78)
    at org.openlca.expressions.Scope.eval(Scope.java:68)
     ... 16 common frames omitted

Thank you!

Andrea M

in openLCA by (140 points)

1 Answer

0 votes
by (131k points)

Caused by: org.openlca.expressions.ParseException: Encountered " <IDENTIFIER> "or "" at line 1, column 19. Was expecting one of: <AND> ... <OR> ... "+" ... "-" ... "*" ... "/" ... "div" ... "<" ... "<=" ... <EQ> ... <NEQ> ... ">" ... ">=" ... "^" ... "mod" ... "xor" ... ")" ... ";" 

?

The csv (not "excel" I think) from Flow is somewhat different from the desktop version of SP - if you want, book a modeler support from Nexus and we can help. Or, post more details here. Thank you!

...