question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Complex expression results in "too many tokens" error

See original GitHub issue

In Enketo 3.0.1 and 4.0.1, a form (foo.xlsx) with a moderate amount of logic in a single expression fails to load due to “too many tokens”.

Screen Shot 2022-05-23 at 14 15 19 Screen Shot 2022-05-23 at 14 13 29

Replacing the expression with ${health_facility_sl} >= -31 and ${health_facility_sl} <= -11 works, but the original expression isn’t that bad.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yanokwacommented, May 23, 2022

SIGH. You are right.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CRX-API-0018 More than 3000 tokens. The report expression ...
The following error appears: The expression is too complex. It has more than 3000 tokens. Error code CRX-API-0018.
Read more >
5940 Excessively complex expression. - Teradata Database
5940 Excessively complex expression. Explanation: Parser detected a complex query. If the expression is processed, the parser may run out of ...
Read more >
BUGS error messages - Stack Overflow
logical expression too complex - a logical node is defined in terms of too many parameters/constants or too many operators: try introducing further...
Read more >
Troubleshoot Query Error Codes - Coveo Documentation
This error is typically the result of a missing value in a JSON key-value pair. ... The Search API returns an error concerning...
Read more >
Parsing Expressions - Crafting Interpreters
If you pass too many, the parser needs to report that error, but it can and should simply keep on parsing the extra...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found