You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pine studies fail with "Can't parse pine": pine-facade translate no longer returns ilTemplate #354
Since 2026-10-27 (between ~08:00 and ~12:00 UTC), pine-facade/translate no longer returns result.ilTemplate. Every Pine study built from it is created with no script, and the chart server answers study_error "Can't parse pine". This affects built-in (STD;RSI), public and private (USER;…) scripts alike.
Where the compiled script went: it is now sent only as the defval of the hidden text input (name: "ILScript") in result.metaInfo.inputs. The value starts with the usual bmI9Ks46_ prefix. pineId and pineVersion still come with an empty defval.
Affected code:parseIndicatorDefinition in the npm 4.x builds (dist/http/indicators.js, script: result.ilTemplate), and getIndicator in src/miscRequests.js on main (script: data.result.ilTemplate). parseInputs skips the text input, so PineIndicator.toStudyInputs() sends text: undefined. This happens on 4.0.0, 4.0.1 and 4.1.0.
Workaround we use: take the script from result.ilTemplate when it is present, else from the text input's defval, and pass that as ilTemplate to parseIndicatorDefinition:
functionscriptFromTranslate(result){if(result.ilTemplate)returnresult.ilTemplate;consttext=result.metaInfo.inputs?.find((input)=>input.id==='text')?.defval;if(typeoftext==='string'&&text)returntext;thrownewError('no compiled script: neither result.ilTemplate nor the "text" input defval');}constindicator=parseIndicatorDefinition({ ...result,ilTemplate: scriptFromTranslate(result)},id,version);
With this change, studies work again for STD;RSI, private scripts and strategies (backtest reports).
Update: TradingView moved the compiled script again. Since about 30 Oct 2026, the text input's defval is empty and the script lives in result.metaInfo.defaults.inputs.text, so the workaround above stopped working.
Fixed in #355, published as 4.1.1-beta.0 (npm i @mathieuc/tradingview@beta). It reads all three locations (ilTemplate, the text input, metaInfo.defaults.inputs.text). Verified live with an authenticated session: STD;RSI and a private USER;… indicator return data again.
On 3.x (src/miscRequests.js, getIndicator), the equivalent patch is:
constr=data.result;consttext=r.metaInfo.inputs?.find((i)=>i.id==='text')?.defval;constscript=r.ilTemplate||(text&&text.startsWith('bmI9Ks46_') ? text : null)||r.metaInfo.defaults?.inputs?.text;// ...then use `script` where `data.result.ilTemplate` was used
Activity
jasongrig commentedon Oct 27, 2026
I had the same issue and the workaround is in the right direction.
fix: read the compiled Pine script from the "text" input
Fix "Can't parse pine": read the compiled script from its new location (
Mathieu2301 commentedon Oct 30, 2026
Update: TradingView moved the compiled script again. Since about 30 Oct 2026, the
textinput'sdefvalis empty and the script lives inresult.metaInfo.defaults.inputs.text, so the workaround above stopped working.Fixed in #355, published as
4.1.1-beta.0(npm i @mathieuc/tradingview@beta). It reads all three locations (ilTemplate, thetextinput,metaInfo.defaults.inputs.text). Verified live with an authenticated session:STD;RSIand a privateUSER;…indicator return data again.On 3.x (
src/miscRequests.js,getIndicator), the equivalent patch is: