Liquid error (line 225): Output string size exceeds limit (size: 2005619)

Hello,

In a template I use the following code

{%assign allexpense = period.accounts.expenses.include_zeros %}

But in file I receive an error.

How can I solve the problem?

Thanks a lot,

Sylvie

Hi @svalais ,

Apologies for the delayed reply.

For performance reasons we limit string lengths to a certain amount. Apparently, all expense accounts (including zeros) returns a too long string (array).

Instead of doing it in one variable/array, you could split it up in smaller ranges? So for instance all60expense, all61exepense, etc.

{% assign all60expense = period.accounts.expenses.include_zeros | range:60 %}
...

Hope this helps!

Kind regards,
Robin

Hi @robindeclercq ,

In this environment, we are working for international customer so the expenses accounts are not always 6 accounts and the income accounts not always 7 accounts.

I tried also without include_zeros but I have the same error.

So I can not apply your solution.

How can I solve the problem?

Kind regards,

Sylvie

Hi @svalais ,

Can you explain a bit more what you are actually doing with this data in the template, or how the output looks like? If we understand the use case better we can perhaps provide some alternative approaches.

Thanks!

Kind regards,
Robin

Hi @robindeclercq
This is the screen of the disclosure:


For each line under the title “P&L Activity:” we have # to select the accounts and behind the # I used period.accounts.expenses.include_zeros and for the column Release I used period.accounts.income.include_zeros.

We have also at the beginning of the disclosure the same for all the assets and liabilities accounts.

So it is possible we will have the same error on another place.

I hope this helps you understand the problem better

Thanks a lot,

Sylvie

Hi @svalais ,

Hmm, so you only create a local variable for this just like in the code snippet you shared in your first message? Do you also create a result of these period.accounts.expenses.include_zeros?

If it is only used locally I’ll check with the backend team if we cannot bypass this specific error.

Kind regards,
Robin