snap-contrib / snapista

SNAP GPT thin layer for Python

Home Page:https://snap-contrib.github.io/snapista/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

band expression issue when escaping special characters < and >

mdelgadoblasco opened this issue · comments

I have experienced an issue when running a graph with BandMath where the expression contains '<' and/or '>' symbols.

Indeed in the url: https://snap-contrib.github.io/snapista/examples/bandmaths/
it also shows same issue:

when you see the expression using print it shows it correctly
'S9_BT_in < 265 ? 0 : F1_BT_in > 315 and (F1_BT_in - F2_BT_in) > 15 ? 1 : 0'

but when creating the graph or viewing the graph it adds 'amp' after &
'S9_BT_in & amp;lt; 265 ? 0 : F1_BT_in & amp;gt; 315 and (F1_BT_in - F2_BT_in) & amp;gt; 15 ? 1 : 0' (I had to add and whitespace character otherwise it was not visible in here....)

@fabricebrito, could you please fix it? Otherwise, GPT complains and cannot use these types of operations.
Probably it is the way you escape these characters which seems differently where you do a graph or simply show the operator.
Thanks in advance

@mdelgadoblasco I understand this is fixed as well. Can you confirm?

I have not tested it. I have used a workaround to get over it.
Probably you have solved it in the last update, but I have not the chance to check it out.