Welcome to the Live docs! Keep this little window open while you work on the notebook, and you will get documentation of everything you type!
You can also type a query above.
Still stuck? Here are some tips.
",loading:!1}),c=e=>l(le((t=>e(t))));i.useEffect((()=>{s.loading||(null==t||/[^\s]/.test(t))&&s.searched_query!==t&&d(t)}),[t,s.loading,s.searched_query]),i.useLayoutEffect((()=>{e&&r.current&&(r.current.focus({preventScroll:!0}),r.current.select())}),[e,r.current]);let d=e=>{c((t=>{t.loading=!0,t.searched_query=e})),Promise.race([no.default.Promises.delay(2e3,!1),a.send("docs",{query:e.replace(/^\?/,"")},{notebook_id:o.notebook_id}).then((t=>"⌛"!==t.message.status&&("👍"===t.message.status?(c((n=>{n.shown_query=e,n.body=t.message.doc})),!0):void 0)))]).then((()=>{c((e=>{e.loading=!1}))}))},u=i.useMemo((()=>i.html`<${tl} body=${ro(s.body)} />`),[s.body]),p=!1===s.loading&&""!==s.searched_query&&s.searched_query!==s.shown_query;return i.html` +${s.shown_query}
Syntax error
${e}
`))},s=[{pattern:/syntax: extra token after end of expression/,display:e=>{const t=i.html`{e.preventDefault(),a.wrap_remote_cell(n,"begin")}} + >Wrap all code in a begin ... end block.`;if(e.includes("\n\nBoundaries: ")){const o=JSON.parse(e.split("\n\nBoundaries: ")[1]).map((e=>e-1)),r=i.html`+ {e.preventDefault(),a.split_remote_cell(n,o,!0)}} + >Split this cell into ${o.length} cells, or +
`;return i.html`Multiple expressions in one cell.
+How would you like to fix it?
+Multiple expressions in one cell.
+${t}
`}},{pattern:/LoadError: cannot assign a value to variable workspace#\d+\..+ from module workspace#\d+/,display:()=>i.html`Tried to reevaluate an include
call, this is not supported. You might need to restart this notebook from the main menu.
+ For a workaround, use the alternative version of include
described here:
+ GH issue 115
+
In the future, include
will be deprecated, and this will be the default.
${e}
`))},{pattern:/Cyclic references among (.*)\./,display:e=>e.split("\n").map((e=>{const t=e.match(/Cyclic references among (.*)\./);if(t){let e=t[1].split(/, | and /).map((e=>i.html`${e}`));return i.html`Cyclic references among${" "}${Ur(e)}.
`}return i.html`${e}
`}))},{pattern:/Multiple definitions for (.*)\./,display:e=>e.split("\n").map((e=>{const t=e.match(/Multiple definitions for (.*)\./);if(t){let e=t[1].split(/, | and /).map((e=>i.html`{const o=document.querySelector(`pluto-cell:not([id='${n}']) span[id='${encodeURI(e)}']`);t.preventDefault(),null==o||o.scrollIntoView()}}>${e}`));return i.html`Multiple definitions for${" "}${Ur(e)}.
`}return i.html`${e}
`}))},{pattern:/^syntax: (.*)$/,display:r.display,show_stacktrace:()=>!1},{pattern:/^UndefVarError: (.*) not defined\.?$/,display:e=>{const t=a.get_notebook(),o=qr(t,n),r=e.match(/UndefVarError: (.*) not defined/);let s=(null==r?void 0:r[1])??"";const l=Object.values((null==t?void 0:t.cell_dependencies)??{}).some((e=>Object.keys(e.downstream_cells_map).includes(s)));if(0===Object.keys(o).length||!l)return i.html`${e}
`;const c=Object.keys(o).map((e=>i.html`{t.preventDefault();const n=document.querySelector(`pluto-cell[id='${o[e]}']`);null==n||n.scrollIntoView()}}>${e}`));return i.html`Another cell defining ${Ur(c)} contains errors.
`},show_stacktrace:()=>{const e=qr(a.get_notebook(),n);return 0===Object.keys(e).length}},r],l=s.find((({pattern:t})=>t.test(e)))??r;return i.html`${t}`;case"application/vnd.pluto.tree+object":return i.html`<${Vr} cell_id=${n} body=${t} persist_js_state=${o} />`;default:return Gs({mime:e,body:t,cell_id:n,persist_js_state:o,sanitize_html:a,last_run_timestamp:null})}},Wr=({on_click_more:e})=>{const[t,n]=i.useState(!1);return i.html`
A new server was started - this notebook session is no longer running.
+Would you like to go back to the main menu?
+The statefile failed to download. Original error message:
+${t.toString()}
+ Launch parameters:
+${JSON.stringify(e,null,2)}
+