Long expression generates an error "too many inputs" #652
-
Problem descriptionWhen I send a reqeust with a complex expression (and hence long such as total url's length = 1851 characters), titiler returns "too many inputs" error. When I change the request with the same url and only shrinked expression, titiler returns the result without any issue. Is there any setting for maximum query length? If so, how can I relax the condition? Expected OutputReturn image response Environment InformationTitiler 0.11.6 / OAS3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
that's really interesting. you expressions are ['0.57103*b1+0.99672*b2+0.96904*b3+0.20021*b4+0.27429*b5+0.79971*b6+0.72686*b7+0.94084*b8+0.18491*b9+0.82333*b10+0.2628*b11+0.93301*b12+0.38127*b13+0.24539*b14+0.10738*b15+0.67462*b16+0.27597*b17+0.27698*b18+0.50362*b19+0.8538*b20+0.27273*b21+0.74617*b22+0.4796*b23+0.22111*b24+0.65345*b25+0.11374*b26+0.09267*b27+0.98799*b28+0.24427*b29+0.18995*b30+0.15173*b31+0.99163*b32+0.59891*b33+0.88331*b34+0.97323*b35+0.89888*b36', '0.04474*b1+0.60977*b2+0.43399*b3+0.67842*b4+0.39043*b5+0.17055*b6+0.11867*b7+0.35566*b8+0.94484*b9+0.91253*b10+0.30639*b11+0.81236*b12+0.98909*b13+0.23044*b14+0.81381*b15+0.98246*b16+0.97092*b17+0.46153*b18+0.99879*b19+0.2217*b20+0.5304*b21+0.95593*b22+0.01583*b23+0.15223*b24+0.07902*b25+0.90673*b26+0.86554*b27+0.51667*b28+0.60937*b29+0.07176*b30+0.74472*b31+0.68408*b32+0.99638*b33+0.86553*b34+0.74682*b35+0.27824*b36', '0.00529*b1+0.17842*b2+0.10294*b3+0.96833*b4+0.85393*b5+0.0152*b6+0.00695*b7+0.07031*b8+0.60713*b9+0.20663*b10+0.72968*b11+0.22667*b12+0.42386*b13+0.59142*b14+0.83484*b15+0.2196*b16+0.51653*b17+0.93309*b18+0.32701*b19+0.02677*b20+0.98461*b21+0.20406*b22+0.01055*b23+0.42558*b24+0.00408*b25+0.69651*b26+0.7623*b27+0.13883*b28+0.99697*b29+0.23217*b30+0.91416*b31+0.20706*b32+0.26038*b33+0.21719*b34+0.22536*b35+0.04243*b36'] which needs all those bands (36)
And I think the error comes from https://github.com/pydata/numexpr/blob/master/numexpr/interpreter.cpp#L1024-L1027 and then is related to numpy/numpy#4398 As soon as you have less than 32 bands in your expression it should work 😓 This is really unfortunate and not a TiTiler issue We could maybe optimized rio-tiler to only pass the needed bands per bloc in https://github.com/cogeotiff/rio-tiler/blob/main/rio_tiler/expression.py#L74 (replacing While I admire that you are using expression for this (I never thought to see this kind of large expression 😅) I think using the Note: I'm going to move this to discussion because it's not a BUG in titiler |
Beta Was this translation helpful? Give feedback.
that's really interesting.
you expressions are